diff --git a/GanttChartHyperLibraryDemos/Demos/Demos.csproj b/GanttChartHyperLibraryDemos/Demos/Demos.csproj index 5edcc4f4e..51bb60e1f 100644 --- a/GanttChartHyperLibraryDemos/Demos/Demos.csproj +++ b/GanttChartHyperLibraryDemos/Demos/Demos.csproj @@ -454,6 +454,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1475,6 +1515,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/GanttChartView/MainFeatures.zip index aaee2d2b5..385c9ce27 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/LoadChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/LoadChartView/MainFeatures.zip index abf316b14..ce2d47c1f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/LoadChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/LoadChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/NetworkDiagramView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/NetworkDiagramView/MainFeatures.zip index fba47f1b6..8a5ab0188 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/NetworkDiagramView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/NetworkDiagramView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/PertChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/PertChartView/MainFeatures.zip index d36429225..1bc79fb75 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/PertChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/PertChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/ScheduleChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/ScheduleChartView/MainFeatures.zip index b92fcfa9e..8aafed15e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Angular/ScheduleChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Angular/ScheduleChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip index 72be0d47f..41c295dda 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip index 97d44a23a..ef6435d5b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip index 84a0a9348..9aedebedb 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip index bf117e690..e91279c58 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/LoadChartView/SingleItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip index b9eeaa7b8..4184619cd 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip index 0aad51340..1cc61c6f3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/NetworkDiagramView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip index 162fe5ef8..da7f0088b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip index 3ac4986ae..25ea3f10e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/PertChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip index b20018625..5f0c2d848 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip index e1557600a..07b769a3f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/AngularJS/ScheduleChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip index 7662c9ca5..51af4c35e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssigningResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip index fa7bd6ff4..6880c8789 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip index 44e0147f5..855a3bdf7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AssignmentsTree-HL.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip index 4f7b27642..b28330fbc 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/AutomaticScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip index 0b2aaa11c..f2ba8ad1c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Baseline.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip index 95aa530a0..468167397 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip index 64914ad93..3e7ca6190 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip index 3f3085c38..cc621f146 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip index 55a674f39..6de76987b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContextMenus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip index ee7b873d1..7d3a2b3a7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip index a8c8c7546..5e4454671 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CriticalPath.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip index 75edd3d7d..11264d42c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip index ab517ce79..98248acda 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomSchedules.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip index 67391c754..d1a933000 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip index 82ec5bbfd..c9ecbdbca 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/DateTimeFormats.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip index f65ec37ff..f3d20407d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ExportPngImage-PMF.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip index f072ac42f..6ab0214ee 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip index fe5b729eb..7f916e940 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/HierarchicalVirtualization.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip index 07a469121..ce5fed971 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Interruptions.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip index 0424d91e0..9becc1320 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip index 792226577..c47e6ad50 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MaterialResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip index 9fa0272fe..401e840c8 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MinuteScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip index d8893a167..10d307d6a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip index 8eb2cbfee..539738b15 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MoveUpDown.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip index ce5db5783..fb5095134 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/MultipleBarsPerItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip index 3142f1ec0..baafc08e4 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Performance.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip index 18d0e8de3..f8ab02031 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip index a7b9ad52f..7cb13f35b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ProjectXml.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip index f6326c3c4..54f50bc19 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip index b19f4f98f..ccf51c0e8 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SelectionModes.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip index 7f2e5c4ce..99d955e09 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip index 620b84957..092b1ccdf 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Statuses.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip index 9f695683d..8dcc5ca9a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors.zip new file mode 100644 index 000000000..a4c6a44ca Binary files /dev/null and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.Angular.Directives.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.Angular.Directives.js new file mode 100644 index 000000000..0823d6ad8 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.Angular.Directives.js @@ -0,0 +1,243 @@ +// Version 1.1.0.0. +var module = angular.module("DlhSoft.Data.Directives", []); +dsDefineDDirective(module, "ContentControl"); +dsDefineDIDirective(module, "ItemsControl"); +dsDefineDDirective(module, "Button", ["click"]); +dsDefineDDirective(module, "ToggleButton", ["toggle"]); +dsDefineDDirective(module, "TextBox", undefined, true); +dsDefineDDirective(module, "CalendarSelector", ["selectedTime"]); +dsDefineDDirective(module, "Calendar", ["selectedDate"]); +dsDefineDVDirective(module, "DatePicker"); +dsDefineDDirective(module, "CalendarDay", ["selectedTime", "header"]); +dsDefineDVDirective(module, "TimePicker", ["header"]); +dsDefineDVDirective(module, "DateTimePicker"); +dsDefineDCVDirective(module, "MultiSelectorComboBox"); +dsDefineDCVDirective(module, "ComboBox"); +dsDefineDCVDirective(module, "DropDownList"); +dsDefineDCDirective(module, "ToolTip"); +dsDefineDGDirective(module, "Grid"); +function dsDefineDDirective(module, directiveName, appendedScope, isChangeHandler, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: getScope({ + settings: "=", + license: "=" + }, appendedScope, isChangeHandler), + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var valueProperty = null; + var initialization = function () { + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + if (isChangeHandler) { + valueProperty = appendedScope ? (appendedScope.indexOf("value") < 0 ? appendedScope[0] : "value") : "value"; + var changeHandler = settings.valueChangeHandler; + if (!changeHandler) + changeHandler = settings.changeHandler; + settings.changeHandler = settings.valueChangeHandler = function (value) { + if (changeHandler) + changeHandler(value); + scope[valueProperty] = value; + scope.$apply(); + if (scope.change) + scope.change(value); + } + } + var component = DlhSoft.Controls[controlName ? controlName : directiveName].initialize.apply(this, getArguments([controlElement, settings, license], appendedScope, scope)); + if (isChangeHandler && component.setValue) + component.setValue(valueProperty && scope[valueProperty] ? scope[valueProperty] : element.text()); + } + initialization(); + if (valueProperty) { + scope.$watch(valueProperty, function (nv, ov) { + if (nv == ov) + return; + var component = DlhSoft.Controls[controlName ? controlName : directiveName].get(controlElement); + var newValue = scope[valueProperty]; + if (component.setValue && component.getValue && newValue != component.getValue()) + setTimeout(function () { component.setValue(newValue); }); + }); + } + } + }; + }); +} +function dsDefineDVDirective(module, directiveName, appendedScope, controlName) { + dsDefineDDirective(module, directiveName, combineScopes(["value"], appendedScope), true, controlName); +} +function dsDefineDIDirective(module, directiveName, appendedScope, controlName) { + dsDefineDDirective(module, directiveName, combineScopes(["items"], appendedScope), true, controlName); +} +function dsDefineDCVDirective(module, directiveName, appendedScope, controlName) { + dsDefineDDirective(module, directiveName, combineScopes(["availableChoices", "value"], appendedScope), true, controlName); +} +function dsDefineDCDirective(module, directiveName, appendedScope, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: getScope({ + settings: "=", + license: "=" + }, appendedScope), + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var parent = element.parent(); + var targetElement = parent[0]; + var initialization = function () { + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + DlhSoft.Controls[controlName ? controlName : directiveName].initialize.apply(this, getArguments([controlElement, targetElement, settings, license], appendedScope, scope, 1)); + } + initialization(); + } + }; + }); +} +function dsDefineDGDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls[controlName ? controlName : directiveName].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function () { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} +function combineScopes(scope, appendedScope) { + if (appendedScope) { + for (var i = 0; i < appendedScope.length; i++) + scope.push(appendedScope[i]); + } + return scope; +} +function getScope(scope, appendedScope, isChangeHandler) { + if (appendedScope) { + for (var i = 0; i < appendedScope.length; i++) + scope[appendedScope[i]] = "="; + } + else if (isChangeHandler) + scope["value"] = "="; + if (isChangeHandler) + scope["change"] = "="; + return scope; +} +function getArguments(arguments, appendedScope, scope, injectionIndex) { + if (typeof injectionIndex === "undefined") + injectionIndex = 0; + if (appendedScope) { + for (var i = 0; i < appendedScope.length; i++) + arguments.splice(i + injectionIndex + 1, 0, scope[appendedScope[i]]); + } + return arguments; +} +function dsDefineHDDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls[controlName ? controlName : directiveName].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function() { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.HTML.Controls.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.HTML.Controls.d.ts new file mode 100644 index 000000000..bba6b997b --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.HTML.Controls.d.ts @@ -0,0 +1,679 @@ +/// +declare module DlhSoft.Controls { + module ContentControl { + function initialize(element: HTMLElement, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IContentContainer { + public host: HTMLElement; + public settings: Settings; + constructor(host: HTMLElement, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + static getContent(host: HTMLElement): HTMLElement; + public refresh(): void; + public content: any; + public setContent(content: any): void; + public contentContainer: HTMLElement; + } + interface Settings { + theme?: string; + containerStyle?: string; + containerClass?: string; + content?: any; + contentTemplate? (document: HTMLDocument, content: any): HTMLElement; + } + } + module ItemsControl { + function initialize(element: HTMLElement, items?: any[], settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IItemsContainer { + public host: HTMLElement; + public settings: Settings; + constructor(host: HTMLElement, items?: any[], settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + static getItems(host: HTMLElement): HTMLElement[]; + public refresh(): void; + public items: any[]; + public setItems(items: any[]): void; + public itemContainers: HTMLElement[]; + } + interface Settings { + theme?: string; + itemContainerStyle?: string; + itemContainerClass?: string; + items?: any[]; + itemTemplate? (document: HTMLDocument, item: any): HTMLElement; + } + } + module Button { + function initialize(element: HTMLElement, clickHandler?: () => void, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IContentContainer, IHoverable, IPressable, IClickable, ISupportsDisabling { + public host: HTMLElement; + public clickHandler: () => void; + public settings: Settings; + constructor(host: HTMLElement, clickHandler?: () => void, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public content: any; + public setContent(content: any): void; + public isEnabled: boolean; + public enable(): void; + public disable(): void; + public isHovering: boolean; + public isPressed: boolean; + public contentControlHost: HTMLElement; + public contentControl: ContentControl.Element; + private inputHost; + public inputElement: HTMLInputElement; + public contentControlSettings: ContentControl.Settings; + public contentContainer: HTMLElement; + public hoverableContainer: HTMLElement; + public pressableContainer: HTMLElement; + } + interface Settings extends ContentControl.Settings { + inputName?: string; + inputType?: string; + isEnabled?: boolean; + disabledStyle?: string; + disabledClass?: string; + hoveringStyle?: string; + hoveringClass?: string; + pressedStyle?: string; + pressedClass?: string; + contentStyle?: string; + contentClass?: string; + hoveringHandler? (target: IHoverable): void; + unhoveringHandler? (target: IHoverable): void; + pressedHandler? (target: IPressable): void; + unpressedHandler? (target: IPressable): void; + } + } + module ToggleButton { + function initialize(element: HTMLElement, toggleHandler?: (isPressed: boolean) => void, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element extends Button.Element implements IControlElement, IContentContainer, IHoverable, IPressable, IClickable { + public toggleHandler: (isPressed: boolean) => void; + constructor(host: HTMLElement, toggleHandler?: (isPressed: boolean) => void, settings?: Settings, license?: String); + public isInitialized: boolean; + } + interface Settings extends Button.Settings { + } + } + module TextBox { + function initialize(element: HTMLElement, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, ITextEditor, ISupportsDisabling { + public host: HTMLElement; + public settings: Settings; + constructor(host: HTMLElement, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public value: string; + public getValue(): string; + public setValue(value: string): void; + public isEnabled: boolean; + public enable(): void; + public disable(): void; + private inputHost; + public inputElement: HTMLInputElement; + } + interface Settings { + theme?: string; + isEnabled?: boolean; + isReadOnly?: boolean; + value?: string; + inputName?: string; + inputType?: string; + inputStyle?: string; + inputClass?: string; + raiseChangeOnBlur?: boolean; + clickHandler? (): void; + changeHandler? (value: string): void; + } + } + module CalendarSelector { + function initialize(element: HTMLElement, selectedTime?: number, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, INumberEditor { + public host: HTMLElement; + public selectedTime: number; + public settings: Settings; + constructor(host: HTMLElement, selectedTime?: number, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public getValue(): number; + public setValue(value: number): void; + public setDisplayedValue(value: number): void; + } + interface Settings { + theme?: string; + headerProvider? (document: HTMLDocument, displayedTime: number): Node; + containerStyle?: string; + containerClass?: string; + headerStyle?: string; + headerClass?: string; + timeStyle?: string; + timeClass?: string; + selectedTimeStyle?: string; + selectedTimeClass?: string; + timeFormatter? (value: number): string; + displayedTime?: number; + rows?: number; + columns?: number; + invertMatrix?: boolean; + minValue?: number; + scrollingHeight?: string; + displayedTimeChangeHandler? (displayedTime: number): void; + selectedTimeChangeHandler? (selectedTime: number): void; + } + } + module Calendar { + function initialize(element: HTMLElement, selectedDate?: Date, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IDateEditor, IMultipleDateEditor, IDateRangeEditor, IMultipleDateRangeEditor { + public host: HTMLElement; + public selectedDate: Date; + public settings: Settings; + constructor(host: HTMLElement, selectedDate?: Date, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + private static weekDuration; + private static initialSundayDateTimeValue; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private draggingFromDate; + private draggingToDate; + public getValue(): Date; + public setValue(value: Date): void; + public setDisplayedValue(value: Date): void; + public getValues(): Date[]; + public setValues(values: Date[]): void; + public getValueRange(): DateInterval; + public setValueRange(valueRange: DateInterval): void; + public getValueRanges(): DateInterval[]; + public setValueRanges(valueRanges: DateInterval[]): void; + public isValueSelected(date: Date): boolean; + public invertValueSelection(date: Date): void; + public selectedDates: Date[]; + public selectedDateRange: DateInterval; + public selectedDateRanges: DateInterval[]; + private static getDate(dateTime); + private static getPreviousWeekStart(dateTime); + private static addDay(date); + private static subtractDay(date); + private static addTimeOfDay(date, timeOfDay); + private static getFirstDayOfMonth(dateTime); + } + interface Settings { + theme?: string; + isReadOnly?: boolean; + displayedDate?: Date; + isTodayLinkVisible?: boolean; + defaultTimeOfDay?: number; + calendarSelectorLevels?: number; + calendarSelectorPopupStyle?: string; + calendarSelectorPopupClass?: string; + containerStyle?: string; + containerClass?: string; + monthYearHeaderStyle?: string; + monthYearHeaderClass?: string; + dayOfWeekHeaderStyle?: string; + dayOfWeekHeaderClass?: string; + dayStyle?: string; + dayClass?: string; + otherMonthDayStyle?: string; + otherMonthDayClass?: string; + selectedDayStyle?: string; + selectedDayClass?: string; + todayLinkStyle?: string; + todayLinkClass?: string; + months?: string[]; + daysOfWeek?: string[]; + todayString?: string; + forceSetOnClick?: boolean; + displayedDateChangeHandler? (displayedDate: Date): void; + selectedDateChangeHandler? (selectedDate: Date): void; + monthRows?: number; + monthColumns?: number; + monthCellSpacing?: string; + monthCellStyle?: string; + monthCellClass?: string; + applyMonthStyleForSingleCell?: boolean; + applyNextMonthButtonToLastColumn?: boolean; + applyNextMonthButtonToLastRow?: boolean; + highlightingStyleSelector?: (Date: any, boolean: any) => string; + highlightingClassSelector?: (Date: any, boolean: any) => string; + disabledDayStyle?: string; + disabledDayClass?: string; + disabledDateSelector?: (Date: any) => boolean; + allowMultipleSelection?: boolean; + allowRangeSelection?: boolean; + selectionChangedHandler? (): void; + minValue?: Date; + } + } + module DatePicker { + function initialize(element: HTMLElement, value?: Date, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IDateEditor, IDropDown { + public host: HTMLElement; + public value: Date; + public settings: Settings; + constructor(host: HTMLElement, value?: Date, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private recordClick(); + private isDuringRecordedClick(); + public getValue(): Date; + public setValue(value: Date): void; + public setDisplayedValue(value: Date): void; + public refreshValue(): void; + private resetValue(value?); + public openDropDown(): void; + public closeDropDown(): void; + private toggleDropDown(); + private inputHost; + public inputElement: HTMLInputElement; + public dropDownButtonElement: HTMLElement; + public popupElement: HTMLElement; + public calendarHost: HTMLElement; + public calendar: Calendar.Element; + public isOpen: boolean; + } + interface Settings extends Calendar.Settings { + dateTimeFormatter? (value: Date): string; + dateTimeParser? (value: string): Date; + isNullValueAccepted?: boolean; + openDropDownOnInputClick?: boolean; + isDropDownButtonVisible?: boolean; + dropDownButtonDefinition?: string; + inputStyle?: string; + inputClass?: string; + popupStyle?: string; + popupClass?: string; + valueChangeHandler? (value: Date): void; + dropDownOpenedHandler? (): void; + dropDownClosedHandler? (): void; + } + } + module CalendarDay { + class Element implements IControlElement, INumberEditor { + public host: HTMLElement; + public selectedTime: number; + public header: string; + public settings: Settings; + constructor(host: HTMLElement, selectedTime?: number, header?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public getValue(): number; + public setValue(value: number): void; + private static getTime(time, hourDivisions); + } + interface Settings { + theme?: string; + header?: string; + isHeaderVisible?: boolean; + isReadOnly?: boolean; + isNowLinkVisible?: boolean; + containerStyle?: string; + containerClass?: string; + headerStyle?: string; + headerClass?: string; + timeStyle?: string; + timeClass?: string; + selectedTimeStyle?: string; + selectedTimeClass?: string; + nowLinkStyle?: string; + nowLinkClass?: string; + nowString?: string; + hourDivisions?: number; + timeFormatter? (value: number): string; + hourColumns?: number; + scrollingHeight?: string; + forceSetOnClick?: boolean; + selectedTimeChangeHandler? (selectedTime: number): void; + highlightingStyleSelector?: (number: any, boolean: any) => string; + highlightingClassSelector?: (number: any, boolean: any) => string; + disabledTimeStyle?: string; + disabledTimeClass?: string; + disabledTimeSelector?: (number: any) => boolean; + } + } + module TimePicker { + function initialize(element: HTMLElement, value?: number, header?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, INumberEditor, IDropDown { + public host: HTMLElement; + public value: number; + public header: string; + public settings: Settings; + constructor(host: HTMLElement, value?: number, header?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private recordClick(); + private isDuringRecordedClick(); + private isMouseWheelScrollingPopup(e); + public getValue(): number; + public setValue(value: number): void; + public refreshValue(): void; + private resetValue(value?); + public openDropDown(): void; + public closeDropDown(): void; + private toggleDropDown(); + private inputHost; + public inputElement: HTMLInputElement; + public dropDownButtonElement: HTMLElement; + public popupElement: HTMLElement; + public calendarDayHost: HTMLElement; + public calendarDay: CalendarDay.Element; + public isOpen: boolean; + } + interface Settings extends CalendarDay.Settings { + timeParser? (value: string): number; + isNullValueAccepted?: boolean; + openDropDownOnInputClick?: boolean; + isDropDownButtonVisible?: boolean; + dropDownButtonDefinition?: string; + inputStyle?: string; + inputClass?: string; + popupStyle?: string; + popupClass?: string; + defaultPrefix?: string; + valueChangeHandler? (value: number): void; + dropDownOpenedHandler? (): void; + dropDownClosedHandler? (): void; + } + } + module DateTimePicker { + function initialize(element: HTMLElement, value?: Date, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IElement, IDateEditor, IDropDown { + public host: HTMLElement; + public value: Date; + public settings: Settings; + constructor(host: HTMLElement, value?: Date, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + static initializeSettings(settings: Settings): void; + public datePicker: DatePicker.Element; + public timePicker: TimePicker.Element; + public inputElement: HTMLInputElement; + public refreshValue(): void; + public getValue(): Date; + public setValue(value: Date): void; + public getTimeValue(): number; + public setTimeValue(value: number): void; + public isOpen: boolean; + public openDropDown(): void; + public closeDropDown(): void; + public isTimeOpen: boolean; + public openTimeDropDown(): void; + public closeTimeDropDown(): void; + public getCurrentValuePart(): string; + } + interface Settings { + theme?: string; + isReadOnly?: boolean; + areCurrentLinksVisible?: boolean; + defaultTimeOfDay?: number; + dateTimeFormatter? (value: Date): string; + dateTimeParser? (value: string): Date; + isNullValueAccepted?: boolean; + popupStyle?: string; + popupClass?: string; + inputStyle?: string; + inputClass?: string; + openDropDownOnInputClick?: boolean; + areDropDownButtonsVisible?: boolean; + disabledDateSelector? (value: Date): boolean; + disabledTimeSelector? (value: number): boolean; + valueChangeHandler? (value: Date): void; + calendarSelectorLevels?: number; + months?: string[]; + daysOfWeek?: string[]; + datePickerSettings?: DatePicker.Settings; + timePickerSettings?: TimePicker.Settings; + } + } + module MultiSelectorComboBox { + function initialize(element: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, ITextEditor, ITextSelector, IDropDown { + public host: HTMLElement; + public availableChoices: string[]; + public value: string; + public settings: Settings; + constructor(host: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private recordClick(); + private isDuringRecordedClick(); + private isMouseWheelScrollingPopup(e); + public getValue(): string; + public setValue(value: string): void; + public refreshValue(): void; + private resetValue(value?); + private setValueInternal(value?, refresh?); + public refreshAvailableChoices(): void; + public getSelectedChoice(availableOnly?: boolean): string; + public getSelectedChoices(availableOnly?: boolean): string[]; + public refreshSelectedChoices(): void; + public selectChoice(choice: string): void; + public unselectChoice(choice: string): void; + private setSelectedChoice(choice, isSelected, closeDropDown?); + public openDropDown(): void; + public closeDropDown(): void; + private toggleDropDown(); + private inputHost; + public inputElement: HTMLInputElement; + public dropDownButtonElement: HTMLElement; + public popupElement: HTMLElement; + public checkBoxListElement: HTMLElement; + public checkBoxElements: HTMLElement[]; + public isOpen: boolean; + } + interface Settings { + theme?: string; + isReadOnly?: boolean; + autoAppendAvailableChoices?: boolean; + openDropDownOnInputClick?: boolean; + isDropDownButtonVisible?: boolean; + dropDownButtonDefinition?: string; + separator?: string; + isSpaceSeparated?: boolean; + delimiters?: string[]; + inputStyle?: string; + inputClass?: string; + popupStyle?: string; + popupClass?: string; + choiceStyle?: string; + choiceClass?: string; + selectedChoiceStyle?: string; + selectedChoiceClass?: string; + areCheckBoxesVisible?: boolean; + valueChangeHandler? (value: string): void; + dropDownOpenedHandler? (): void; + dropDownClosedHandler? (): void; + } + } + module ComboBox { + function initialize(element: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element extends MultiSelectorComboBox.Element { + constructor(host: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + } + interface Settings extends MultiSelectorComboBox.Settings { + } + } + module DropDownList { + function initialize(element: HTMLElement, availableChoices: string[], value?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element extends ComboBox.Element { + } + interface Settings extends ComboBox.Settings { + } + } + module ToolTip { + function initialize(content: any, targetElement: HTMLElement, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IAttached, ISupportsDisabling, ISupportsHiding, ISupportsPositioning, IContentContainer { + public content: any; + public targetElement: HTMLElement; + public settings: Settings; + constructor(content: any, targetElement: HTMLElement, settings?: Settings, license?: String); + public host: HTMLElement; + public contentContainer: HTMLElement; + public isInitialized: boolean; + public isEnabled: boolean; + public isVisible: boolean; + static initializeSettings(settings: Settings): void; + public x: number; + public y: number; + public refresh(): void; + public setPosition(x: number, y: number): void; + public setHorizontalPosition(x: number): void; + public setVerticalPosition(y: number): void; + public enable(): void; + public disable(): void; + public show(): void; + public hide(): void; + private static previouslyShown; + public setContent(content: any): void; + } + interface Settings { + theme?: string; + isEnabled?: boolean; + duration?: number; + isVisible?: boolean; + containerStyle?: string; + containerClass?: string; + shownHandler? (): void; + hiddenHandler? (): void; + } + } + module Grid { + function initialize(element: HTMLElement, items?: Item[], settings?: Settings, license?: String): Element; + function getDefaultColumns(items?: Item[], settings?: Settings): Column[]; + interface Element extends Controls.TreeGrid.Element { + } + interface Settings extends Controls.TreeGrid.Settings { + } + interface Column extends Controls.TreeGrid.Column { + } + interface Item extends Controls.TreeGrid.Item { + } + } + interface DateInterval { + start: Date; + finish: Date; + } + interface IElement { + isInitialized: boolean; + } + interface IControlElement extends IElement { + refresh(): void; + } + interface IContentContainer { + content: any; + setContent(content: any): void; + } + interface IItemsContainer { + items: any[]; + setItems(items: any[]): void; + } + interface IHoverable { + isHovering: boolean; + } + interface IPressable { + isPressed: boolean; + } + interface IClickable { + clickHandler(): void; + } + interface IChangeable { + changeHandler(value: any): void; + } + interface IEditor { + getValue(): any; + setValue(value: any): void; + } + interface INumberEditor extends IEditor { + getValue(): number; + setValue(value: number): void; + } + interface IDateEditor extends IEditor { + getValue(): Date; + setValue(value: Date): void; + } + interface IMultipleDateEditor extends IDateEditor { + getValues(): Date[]; + setValues(values: Date[]): void; + } + interface IDateRangeEditor extends IDateEditor { + getValueRange(): DateInterval; + setValueRange(valueRange: DateInterval): void; + } + interface IMultipleDateRangeEditor extends IDateRangeEditor, IMultipleDateEditor { + getValueRanges(): DateInterval[]; + setValueRanges(valueRanges: DateInterval[]): void; + } + interface ITextEditor extends IEditor { + getValue(): string; + setValue(value: string): void; + } + interface ITextSelector { + getSelectedChoice(): string; + getSelectedChoices(): string[]; + selectChoice(value: string): void; + unselectChoice(value: string): void; + } + interface IDropDown { + isOpen: boolean; + openDropDown(): void; + closeDropDown(): void; + } + interface IAttached { + targetElement: HTMLElement; + } + interface ISupportsDisabling { + isEnabled: boolean; + enable(): void; + disable(): void; + } + interface ISupportsHiding { + isVisible: boolean; + show(): void; + hide(): void; + } + interface ISupportsPositioning { + x: number; + y: number; + setPosition(x: number, y: number): void; + setHorizontalPosition(x: number): void; + setVerticalPosition(y: number): void; + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.HTML.Controls.js new file mode 100644 index 000000000..e0fcae2be --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.Data.HTML.Controls.js @@ -0,0 +1,204 @@ +"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.Data.HTML.Controls",company:"DlhSoft",product:"Data Modern Library",version:"5.2.3.0",copyright:"Copyright \ufffd 2014-2015 DlhSoft",title:"Data HTML Controls",description:"Data related HTML client components"});DlhSoft.buildReleaseDate=function(l,g,t){l=new Date(l,g-1,t);return l>DlhSoft.buildReleaseDate?l:DlhSoft.buildReleaseDate}(2015,5,8);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var l=_0x5c25[1],g=_0x5c25[2],t=[],u=[],A=_0x5c25[3],z=function(v,o){if(typeof v!==g||typeof o!==g)return!1;if(o==A)return!0;var r=o[_0x5c25[11]](_0x5c25[10]);if(0<=r){var q=o[_0x5c25[12]](0,r),j,s=q[_0x5c25[11]](_0x5c25[10]);if(0<=s)try{j=new Date(parseInt(q[_0x5c25[12]](s+1)))}catch(k){}typeof j===l&&(j=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>j)return!1;q=q+_0x5c25[10]+v;for(i=j=0;ij&&(j=Math[_0x5c25[15]](2,32)-j);q=j.toString(16)[_0x5c25[16]]();r=o[_0x5c25[12]](r+1);if(q==r)return!0}return!1},x=function(g,o,r,q,j){var s=_0x5c25[17],k=_0x5c25[18],p=typeof ComponentSource===l||!ComponentSource?k+_0x5c25[19]+q+_0x5c25[20]+j:_0x5c25[21],c=q+_0x5c25[22]+j+_0x5c25[23],a=_0x5c25[24],b=_0x5c25[25],d=_0x5c25[26];setTimeout(function(){var f=g[_0x5c25[27]],e=f[_0x5c25[29]](_0x5c25[28]);e[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var h=f[_0x5c25[29]](_0x5c25[28]);h[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);h[_0x5c25[35]](m);m[_0x5c25[35]](f[_0x5c25[36]](s));h[_0x5c25[35]](f[_0x5c25[36]](a+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](o));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](b+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](c));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](d+ +_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);n[_0x5c25[32]](_0x5c25[41],p);n[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[44]));m[_0x5c25[35]](n);n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);n[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[47]));n[_0x5c25[50]](_0x5c25[48],function(){g[_0x5c25[49]](e);u[_0x5c25[7]](r)}, +!1);m[_0x5c25[35]](n);h[_0x5c25[35]](m);e[_0x5c25[35]](h);g[_0x5c25[35]](e)},0);setTimeout(function(){alert(s+_0x5c25[51]+a+_0x5c25[52]+o+_0x5c25[51]+b+_0x5c25[53]+c+_0x5c25[51]+d+_0x5c25[4])},6E5)};return{setLicense:function(g,l){t[_0x5c25[7]]({type:g,content:l})},validate:function(v,o,r,q,j,s,k){for(var o=o+_0x5c25[4]+r,p=0;pDlhSoft.buildReleaseDate?l:DlhSoft.buildReleaseDate}(2015,5,8);_0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var l=_0x5c25[1],g=_0x5c25[2],t=[],u=[],A=_0x5c25[3],z=function(v,o){if(typeof v!==g||typeof o!==g)return!1;if(o==A)return!0;var r=o[_0x5c25[11]](_0x5c25[10]);if(0<=r){var q=o[_0x5c25[12]](0,r),j,s=q[_0x5c25[11]](_0x5c25[10]);if(0<=s)try{j=new Date(parseInt(q[_0x5c25[12]](s+1)))}catch(k){}typeof j===l&&(j=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>j)return!1;q=q+_0x5c25[10]+v;for(i=j=0;ij&&(j=Math[_0x5c25[15]](2,32)-j);q=j.toString(16)[_0x5c25[16]]();r=o[_0x5c25[12]](r+1);if(q==r)return!0}return!1},x=function(g,o,r,q,j){var s=_0x5c25[17],k=_0x5c25[18],p=typeof ComponentSource===l||!ComponentSource?k+_0x5c25[19]+q+_0x5c25[20]+j:_0x5c25[21],c=q+_0x5c25[22]+j+_0x5c25[23],a=_0x5c25[24],b=_0x5c25[25],d=_0x5c25[26];setTimeout(function(){var f=g[_0x5c25[27]],e=f[_0x5c25[29]](_0x5c25[28]);e[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var h=f[_0x5c25[29]](_0x5c25[28]);h[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);h[_0x5c25[35]](m);m[_0x5c25[35]](f[_0x5c25[36]](s));h[_0x5c25[35]](f[_0x5c25[36]](a+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](o));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](b+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](c));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](d+ +_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);n[_0x5c25[32]](_0x5c25[41],p);n[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[44]));m[_0x5c25[35]](n);n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);n[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[47]));n[_0x5c25[50]](_0x5c25[48],function(){g[_0x5c25[49]](e);u[_0x5c25[7]](r)}, +!1);m[_0x5c25[35]](n);h[_0x5c25[35]](m);e[_0x5c25[35]](h);g[_0x5c25[35]](e)},0);setTimeout(function(){alert(s+_0x5c25[51]+a+_0x5c25[52]+o+_0x5c25[51]+b+_0x5c25[53]+c+_0x5c25[51]+d+_0x5c25[4])},6E5)};return{setLicense:function(g,l){t[_0x5c25[7]]({type:g,content:l})},validate:function(v,o,r,q,j,s,k){for(var o=o+_0x5c25[4]+r,p=0;p=a.rows&&(a.rows=1);"undefined"=== +typeof a.columns?a.columns=3:0>=a.columns&&(a.columns=1);"undefined"===typeof a.headerProvider&&(a.headerProvider=function(b,d){return b.createTextNode(d!=null?d.toString()+" - "+(d+a.rows*a.columns-1).toString():"?")});"undefined"===typeof a.headerStyle&&(a.headerStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default"); +"undefined"===typeof a.timeStyle&&(a.timeStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; min-width: "+Math.max(128/a.columns,64)+"px; height: "+Math.max(80/a.rows,20)+"px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.selectedTimeStyle&&(a.selectedTimeStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"=== +typeof a.timeFormatter&&(a.timeFormatter=function(a){return a.toString()});"undefined"===typeof a.invertMatrix&&(a.invertMatrix=!1);"undefined"===typeof a.minValue&&(a.minValue=0);"undefined"===typeof a.scrollingHeight&&(a.scrollingHeight="auto")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0a.monthRows&&(a.monthRows=1);"undefined"===typeof a.monthColumns&&(a.monthColumns=1);1>a.monthColumns&&(a.monthColumns=1);"undefined"===typeof a.monthCellSpacing&&(a.monthCellSpacing="0");"undefined"=== +typeof a.applyMonthStyleForSingleCell&&(a.applyMonthStyleForSingleCell=!1);"undefined"===typeof a.applyNextMonthButtonToLastColumn&&(a.applyNextMonthButtonToLastColumn=!0);"undefined"===typeof a.applyNextMonthButtonToLastRow&&(a.applyNextMonthButtonToLastRow=!1);"undefined"===typeof a.containerStyle&&(a.containerStyle=("Modern"==a.theme?"":"border: 1px solid #707070; ")+"font-family: Arial"+("undefined"===typeof a.monthCellStyle&&(1=c.dayDuration&&(h=c.subtractDay(h));f=h;for(var m=0;mthis.settings.calendarSelectorLevels|| +0a.settings.calendarSelectorLevels)return c;var e=b.createElement("a");e.setAttribute("href","javascript://");e.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit"); +e.appendChild(c);var h=b.createElement("div");h.setAttribute("style","display: none; position: absolute; margin-left: -10px");e.appendChild(h);var m=b.createElement("div");m.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass&&m.setAttribute("class",a.settings.calendarSelectorPopupClass);h.appendChild(m);e.onclick=function(b){if((b.target||b.srcElement)==e){if("none"!=h.style.display)h.style.display="none";else{var c=Math.floor(d/12)-1;h.style.display= +"block";var g=z.initialize(m,c,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(b,d){var c=b.createTextNode((d+1).toString()+" - "+(d+10).toString());if(3>a.settings.calendarSelectorLevels)return c;var e=b.createElement("a");e.setAttribute("href","javascript://");e.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");e.appendChild(c);var f=b.createElement("div");f.setAttribute("style","display: none; position: absolute; margin-left: -10px"); +e.appendChild(f);var h=b.createElement("div");h.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass&&h.setAttribute("class",a.settings.calendarSelectorPopupClass);f.appendChild(h);e.onclick=function(a){if((a.target||a.srcElement)==e){if("none"!=f.style.display)f.style.display="none";else{var b=Math.floor(d/10);f.style.display="block";z.initialize(h,b,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(a,b){return a.createTextNode((10*b+1).toString()+ +" - "+(10*(b+10)).toString())},timeFormatter:function(a){return(10*a+1).toString()+"-"+(10*a+10).toString().substr((10*a+10).toString().length-2)},minValue:10},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.").settings.selectedTimeChangeHandler=function(a){g.setDisplayedValue(10*a)}}a.stopPropagation()}};return e},timeFormatter:function(a){return(a+1).toString()},minValue:100},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); +g.settings.selectedTimeChangeHandler=function(a){f.setDisplayedValue(12*(a+1))}}b.stopPropagation()}};return e},timeFormatter:function(b){return a.settings.months[b-12*Math.floor(b/12)]},minValue:1212};q.style.display="block";var f=z.initialize(s,d,c,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");f.settings.selectedTimeChangeHandler=function(b){a.setDisplayedValue(new Date(Math.floor(b/12),b-12*Math.floor(b/ +12),1))}}b.stopPropagation()}}}l.appendChild(j);e.appendChild(l);l=b.createElement("td");l.setAttribute("style","text-align: right; padding-right: 4px");if((!this.settings.applyNextMonthButtonToLastRow?0==m:m==this.settings.monthRows-1)&&(this.settings.applyNextMonthButtonToLastColumn?g==this.settings.monthColumns-1:0==g))j=b.createElement("a"),j.setAttribute("href","javascript://"),j.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme?"10px":"x-small")+ +"; cursor: pointer"),j.appendChild(b.createTextNode("\u25ba")),j.onclick=function(b){for(var d=h;d.getMonth()==h.getMonth();)d=c.addDay(d);a.setDisplayedValue(d);b.stopPropagation()},l.appendChild(j);e.appendChild(l);k.appendChild(e);l=b.createElement("tr");for(e=0;7>e;e++)j=b.createElement("td"),j.setAttribute("style",this.settings.dayOfWeekHeaderStyle),j.setAttribute("class",this.settings.dayOfWeekHeaderClass),j.appendChild(b.createTextNode(this.settings.daysOfWeek[e])),l.appendChild(j);k.appendChild(l); +l=null!=this.selectedDate?c.getDate(this.selectedDate):null;null!=l&&this.settings.defaultTimeOfDay>=c.dayDuration&&(l=c.subtractDay(l));j=f.getMonth();e=c.getFirstDayOfMonth(f);p=c.getPreviousWeekStart(e);for(f=0;6>f;f++){var r=b.createElement("tr");for(e=0;7>e;e++){var t=b.createElement("td");t.setAttribute("style",this.settings.dayStyle);t.setAttribute("class",this.settings.dayClass);var u=p.getDate().toString(),w=b.createElement("span");t.appendChild(w);var v=b.createElement("span");w.appendChild(v); +var B="undefined"!==typeof this.settings.disabledDateSelector&&this.settings.disabledDateSelector(p),x=p.getMonth()==j,y=b.createElement("a");y.setAttribute("href","javascript://");y.setAttribute("style","text-decoration: none; display: inline-block; cursor: "+(this.settings.isReadOnly||B||!x&&(this.settings.allowRangeSelection||this.settings.allowMultipleSelection)?"default":"pointer")+"; color: inherit; width: 20px");y.appendChild(b.createTextNode(u));v.appendChild(y);if(B)w.setAttribute("style", +this.settings.disabledDayStyle),w.setAttribute("class",this.settings.disabledDayClass);else if(x){if(u=l&&Math.abs(p.valueOf()-l.valueOf())<=c.hourDuration||this.isValueSelected(p))w.setAttribute("style",this.settings.selectedDayStyle),w.setAttribute("class",this.settings.selectedDayClass);this.settings.highlightingStyleSelector&&(w=this.settings.highlightingStyleSelector(p,u))&&v.setAttribute("style",w);this.settings.highlightingClassSelector&&(w=this.settings.highlightingClassSelector(p,u))&&v.setAttribute("class", +w)}else v.setAttribute("style",this.settings.otherMonthDayStyle),v.setAttribute("class",this.settings.otherMonthDayClass);!this.settings.isReadOnly&&!B&&(y.value=c.addTimeOfDay(p,this.settings.defaultTimeOfDay),!this.settings.allowMultipleSelection&&!this.settings.allowRangeSelection?y.onclick=function(b){var d=b.currentTarget.value;a.setDisplayedValue(d);a.setValue(d);b.stopPropagation()}:this.settings.allowRangeSelection?x&&(y.onmousedown=function(b){var d=b.currentTarget.value;a.draggingFromDate= +d;a.setValue(d);b.preventDefault()},y.onmouseover=function(b){if(a.draggingFromDate&&(b=b.currentTarget.value,!a.draggingToDate||b.valueOf()!=a.draggingToDate.valueOf()))a.draggingToDate=b,a.setValueRange({start:a.draggingFromDate,finish:a.draggingToDate})}):x&&(y.onclick=function(b){a.invertValueSelection(b.currentTarget.value);b.stopPropagation()}));r.appendChild(t);p=c.addDay(p)}k.appendChild(r)}f=p}}!this.settings.isReadOnly&&this.settings.isTodayLinkVisible&&(m=b.createElement("tr"),n=b.createElement("td"), +n.colSpan=7,n.setAttribute("style",this.settings.todayLinkStyle),n.setAttribute("class",this.settings.todayLinkClass),g=b.createElement("a"),g.setAttribute("href","javascript://"),g.setAttribute("style","text-decoration: none; color: inherit; cursor: pointer"),g.appendChild(b.createTextNode(this.settings.todayString)),n.appendChild(g),g.value=c.addTimeOfDay(c.getDate(new Date),this.settings.defaultTimeOfDay),g.onclick=function(b){var d=b.currentTarget.value;a.setDisplayedValue(d);a.setValue(d);b.stopPropagation()}, +m.appendChild(n),d.appendChild(m));this.host.appendChild(d);this.isInitialized||b.addEventListener("mouseup",function(){a.draggingToDate&&delete a.draggingToDate;a.draggingFromDate&&delete a.draggingFromDate},!0)};c.prototype.getValue=function(){return this.selectedDate};c.prototype.setValue=function(a){null!=a&&a6.5*c.dayDuration)for(b=0;7>b;b++)a=c.addDay(a);return a};c.addDay=function(a){var b=a.getTimezoneOffset()*c.minuteDuration,a=new Date(a.valueOf()-b+c.dayDuration),b=a.getTimezoneOffset()*c.minuteDuration;return new Date(a.valueOf()+b)};c.subtractDay=function(a){return c.getDate(new Date(a.valueOf()-c.dayDuration))};c.addTimeOfDay=function(a,b){var d= +a.getTimezoneOffset()*c.minuteDuration,a=new Date(a.valueOf()-d+b),d=a.getTimezoneOffset()*c.minuteDuration;return new Date(a.valueOf()+d)};c.getFirstDayOfMonth=function(a){for(a=c.getDate(a);1a.popupElement.ownerDocument.documentElement.clientHeight&&b.top>=d.height&&(a.popupElement.style.top=b.top-d.height+2+"px");d.right>a.popupElement.ownerDocument.documentElement.clientWidth&& +a.popupElement.ownerDocument.documentElement.clientWidth>=d.width&&(a.popupElement.style.left=a.popupElement.ownerDocument.documentElement.clientWidth-d.width+"px")};b();this.isOpen&&this.settings.dropDownOpenedHandler?this.settings.dropDownOpenedHandler():!this.isOpen&&this.settings.dropDownClosedHandler&&this.settings.dropDownClosedHandler();if(this.isOpen){var d=this.host.ownerDocument.documentElement.clientWidth,c=this.host.ownerDocument.documentElement.clientHeight,e=this.host.getBoundingClientRect(); +this.positionChangeHandlerTimer=setInterval(function(){var h=a.host.ownerDocument.documentElement.clientWidth,m=a.host.ownerDocument.documentElement.clientHeight,g=a.host.getBoundingClientRect();h!=d||m!=c?a.closeDropDown():(g.left!=e.left||g.top!=e.top||g.width!=e.width||g.height!=e.height)&&b();d=h;c=m;e=g},100)}else this.positionChangeHandlerTimer&&(clearInterval(this.positionChangeHandlerTimer),delete this.positionChangeHandlerTimer)};return c}();g.Element=j})(v=g.DatePicker||(g.DatePicker={})); +var o;(function(g){var j=function(){function c(a,b,d,f,e){this.host=a;this.selectedTime=b;this.header=d;this.settings=f;this.isInitialized=!1;var h="DlhSoft.Controls CalendarDay DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component=this;"undefined"===typeof f&&(f={});"undefined"!==typeof d&&"undefined"===typeof f.header&&(f.header=d);this.settings=f;c.initializeSettings(this.settings);"undefined"===typeof b&&(a=new Date,b=(new Date(a.valueOf()- +a.getTimezoneOffset()*c.minuteDuration)).getTime(),b-=Math.floor(b/c.dayDuration)*c.dayDuration);this.selectedTime=b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.isNowLinkVisible&&(a.isNowLinkVisible=!1);"undefined"===typeof a.header&&(a.header="Time of day");"undefined"===typeof a.isHeaderVisible&&(a.isHeaderVisible=!0);"undefined"===typeof a.headerStyle&& +(a.headerStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.timeStyle&&(a.timeStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; min-width: 24px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+ +("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.selectedTimeStyle&&(a.selectedTimeStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"===typeof a.disabledTimeStyle&&(a.disabledTimeStyle="color: "+("Modern"==a.theme?"#c0c0c0":"Silver"));"undefined"===typeof a.nowLinkStyle&&(a.nowLinkStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; padding: 4px; border-top: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")+"; font-size: "+("Modern"==a.theme?"12px":"small")+ +"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.nowString&&(a.nowString="Now");"undefined"===typeof a.hourDivisions?a.hourDivisions=2:0>=a.hourDivisions&&(a.hourDivisions=1);"undefined"===typeof a.timeFormatter&&(a.timeFormatter=function(a){var d=Math.floor(a/c.hourDuration),a=Math.floor((a-d*c.hourDuration)/c.minuteDuration),f=function(a,b){b===void 0&&(b=2);for(var d=a.toString();d.length< +b;)d="0"+d;return d};return f(d)+":"+f(a)});"undefined"===typeof a.hourColumns?a.hourColumns=4:0>=a.hourColumns&&(a.hourColumns=1);"undefined"===typeof a.scrollingHeight&&(a.scrollingHeight="auto")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0d&&(d=new Date,d=(new Date(d.valueOf()-d.getTimezoneOffset()*c.minuteDuration)).getTime(),d-=Math.floor(d/c.dayDuration)*c.dayDuration);a.setValue(d);b.stopPropagation()}, +q.appendChild(f),d.appendChild(q));this.host.appendChild(d)};c.prototype.getValue=function(){return this.selectedTime};c.prototype.setValue=function(a){null!=a&&0>a&&(a=0);if(a!=this.selectedTime||this.settings.forceSetOnClick)this.selectedTime=a,this.refresh(),this.settings.selectedTimeChangeHandler&&this.settings.selectedTimeChangeHandler(a)};c.getTime=function(a,b){var d=c.hourDuration/b;return Math.floor(a/d)*d};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration; +c.dayDuration=24*c.hourDuration;return c}();g.Element=j})(o=g.CalendarDay||(g.CalendarDay={}));var r;(function(g){g.initialize=function(c,a,b,d,f){return new j(c,a,b,d,f)};g.get=function(c){return c.component};var j=function(){function c(a,b,d,f,e){this.host=a;this.value=b;this.header=d;this.settings=f;this.isInitialized=!1;this.dropDownButtonElement=null;var h="DlhSoft.Controls TimePicker DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component= +this;"undefined"===typeof f&&(f={});"undefined"!==typeof d&&"undefined"===typeof f.header&&(f.header=d);this.settings=f;c.initializeSettings(this.settings);d=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null){if(null==b)try{b=this.settings.timeParser(this.inputHost.value)}catch(m){}a=d.createElement("span");this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost);this.host=a;l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component= +this}"undefined"===typeof b&&(f.isNullValueAccepted?b=null:(b=new Date,b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime(),b-=Math.floor(b/c.dayDuration)*c.dayDuration));this.value=b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.isNowLinkVisible&&(a.isNowLinkVisible=!0);"undefined"===typeof a.timeFormatter&&(a.timeFormatter=function(b){if(b==null&&a.isNullValueAccepted)return"";var d=Math.floor(b/c.hourDuration),b=Math.floor((b- +d*c.hourDuration)/c.minuteDuration),f=function(a,b){b===void 0&&(b=2);for(var d=a.toString();d.length=0&&(b=b.substr(d+1));b=new Date("01/01/1970 "+b);if(isNaN(b.valueOf())|| +b.getFullYear()<=0||b.getFullYear()!=1970||b.getMonth()!=0||b.getDate()!=1){b=new Date;b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime();return b=b-Math.floor(b/c.dayDuration)*c.dayDuration}return b.getTime()-b.getTimezoneOffset()*c.minuteDuration});"undefined"===typeof a.isNullValueAccepted&&(a.isNullValueAccepted=!0);"undefined"===typeof a.isDropDownButtonVisible&&(a.isDropDownButtonVisible=!1);"undefined"===typeof a.dropDownButtonDefinition&&(a.dropDownButtonDefinition= +"");"undefined"===typeof a.popupStyle&&(a.popupStyle="background-color: White; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+ +"; font-family: Arial");"undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px");"undefined"===typeof a.defaultPrefix&&(a.defaultPrefix="")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0=a.scrollTop&&0= +a.scrollHeight-a.clientHeight-1&&0>b))d=!0;if(a==this.popupElement)return d;a=a.parentElement}return!1};c.prototype.getValue=function(){return this.value};c.prototype.setValue=function(a){this.resetValue(a)};c.prototype.refreshValue=function(){this.resetValue()};c.prototype.resetValue=function(a){if(!this.isDuringInternalSetValue){this.isDuringInternalSetValue=!0;this.closeDropDown();var b=this.value;try{this.value=null!=a?a:this.settings.timeParser(this.inputElement.value)}catch(d){}this.settings.disabledTimeSelector&& +(null!=this.value&&this.settings.disabledTimeSelector(this.value))&&(this.settings.isNullValueAccepted?this.value=null:(a=new Date,this.value=(new Date(a.valueOf()-a.getTimezoneOffset()*c.minuteDuration)).getTime(),this.value-=Math.floor(this.value/c.dayDuration)*c.dayDuration));a=this.inputElement.value?this.inputElement.value.lastIndexOf(" "):-1;a=0<=a?this.inputElement.value.substr(0,a):this.settings.defaultPrefix;0a.popupElement.ownerDocument.documentElement.clientHeight&&b.top>=d.height&&(a.popupElement.style.top=b.top-d.height+2+"px");d.right>a.popupElement.ownerDocument.documentElement.clientWidth&&a.popupElement.ownerDocument.documentElement.clientWidth>=d.width&&(a.popupElement.style.left=a.popupElement.ownerDocument.documentElement.clientWidth-d.width+"px")};b();this.isOpen&&this.settings.dropDownOpenedHandler?this.settings.dropDownOpenedHandler():!this.isOpen&&this.settings.dropDownClosedHandler&& +this.settings.dropDownClosedHandler();if(this.isOpen){this.calendarDay.selectedElement&&this.calendarDay.selectedElement.scrollIntoView();var d=this.host.ownerDocument.documentElement.clientWidth,c=this.host.ownerDocument.documentElement.clientHeight,e=this.host.getBoundingClientRect();this.positionChangeHandlerTimer=setInterval(function(){var h=a.host.ownerDocument.documentElement.clientWidth,g=a.host.ownerDocument.documentElement.clientHeight,k=a.host.getBoundingClientRect();h!=d||g!=c?a.closeDropDown(): +(k.left!=e.left||k.top!=e.top||k.width!=e.width||k.height!=e.height)&&b();d=h;c=g;e=k},100)}else this.positionChangeHandlerTimer&&(clearInterval(this.positionChangeHandlerTimer),delete this.positionChangeHandlerTimer)};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration;c.dayDuration=24*c.hourDuration;return c}();g.Element=j})(r=g.TimePicker||(g.TimePicker={}));(function(g){g.initialize=function(c,a,b,d){return new j(c,a,b,d)};g.get=function(c){return c["DateTimePicker.component"]}; +var j=function(){function c(a,b,d,f){var e=this;this.host=a;this.value=b;this.settings=d;this.isInitialized=!1;this.host["DateTimePicker.component"]=this;"undefined"===typeof d&&(d={});"undefined"!==typeof d.license&&"undefined"!==typeof d.datePickerSettings&&(d.datePickerSettings.license=d.license);this.settings=d;c.initializeSettings(this.settings);"undefined"===typeof b&&(b=d.datePickerSettings.isNullValueAccepted?null:new Date);this.value=b;this.timePicker=r.initialize(a,void 0,void 0,this.settings.timePickerSettings, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");this.inputElement=this.timePicker.inputElement;this.inputElement["DateTimePicker.component"]=this;this.datePicker=v.initialize(this.inputElement,this.value,this.settings.datePickerSettings,f);this.value=this.datePicker.value;var h;try{h=b?this.datePicker.settings.dateTimeFormatter(b):""}catch(g){h=""}a=h.lastIndexOf(" ");0<=a&&(h=h.substr(0,a));this.timePicker.settings.defaultPrefix= +h;var k=this.datePicker.settings.dropDownOpenedHandler;this.datePicker.settings.dropDownOpenedHandler=function(){e.datePicker.isOpen&&e.timePicker.isOpen&&e.timePicker.closeDropDown();e.isOpen=e.datePicker.isOpen;k&&k()};var j=this.datePicker.settings.dropDownClosedHandler;this.datePicker.settings.dropDownClosedHandler=function(){e.isOpen=e.datePicker.isOpen;j&&j()};var l=this.timePicker.settings.dropDownOpenedHandler;this.timePicker.settings.dropDownOpenedHandler=function(){e.timePicker.isOpen&& +!e.value?e.timePicker.closeDropDown():(e.timePicker.isOpen&&e.datePicker.isOpen&&e.datePicker.closeDropDown(),e.isTimeOpen=e.timePicker.isOpen,l&&l())};var p=this.timePicker.settings.dropDownClosedHandler;this.timePicker.settings.dropDownClosedHandler=function(){e.isTimeOpen=e.timePicker.isOpen;p&&p()};var o=this.datePicker.settings.valueChangeHandler;this.datePicker.settings.valueChangeHandler=function(a){e.value=a;o&&o(a)};this.inputElement&&(this.inputElement.addEventListener("focus",function(){if(e.settings.openDropDownOnInputClick){switch(e.getCurrentValuePart()){default:e.openDropDown(); +break;case "Time":e.timePicker.refreshValue(),e.openTimeDropDown()}e.focusValue=e.inputElement.value}},!0),this.inputElement.addEventListener("blur",function(){e.settings.openDropDownOnInputClick&&"undefined"!==typeof e.focusValue&&delete e.focusValue},!0),this.inputElement.addEventListener("keydown",function(a){13==a.keyCode?e.settings.openDropDownOnInputClick&&e.refreshValue():e.closeDropDown()},!0),this.inputElement.addEventListener("mousedown",function(){setTimeout(function(){if(e.settings.openDropDownOnInputClick&& +!("undefined"!==typeof e.focusValue&&e.inputElement.value!=e.focusValue))switch(e.getCurrentValuePart()){default:e.datePicker.refreshValue();e.openDropDown();break;case "Time":e.timePicker.refreshValue(),e.openTimeDropDown()}},0)},!0));this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.isNullValueAccepted&&(a.isNullValueAccepted=!0);"undefined"===typeof a.openDropDownOnInputClick&& +(a.openDropDownOnInputClick=!0);"undefined"===typeof a.datePickerSettings&&(a.datePickerSettings={});a.datePickerSettings.isReadOnly=a.isReadOnly;a.datePickerSettings.theme=a.theme;"undefined"===typeof a.datePickerSettings.isTodayLinkVisible&&(a.datePickerSettings.isTodayLinkVisible=a.areCurrentLinksVisible);"undefined"===typeof a.datePickerSettings.defaultTimeOfDay&&(a.datePickerSettings.defaultTimeOfDay=a.defaultTimeOfDay);a.datePickerSettings.openDropDownOnInputClick=!1;"undefined"===typeof a.datePickerSettings.isDropDownButtonVisible&& +(a.datePickerSettings.isDropDownButtonVisible=a.areDropDownButtonsVisible);a.datePickerSettings.allowMultipleSelection=!1;a.datePickerSettings.allowRangeSelection=!1;"undefined"===typeof a.datePickerSettings.dateTimeFormatter&&(a.datePickerSettings.dateTimeFormatter=a.dateTimeFormatter);"undefined"===typeof a.datePickerSettings.dateTimeParser&&(a.datePickerSettings.dateTimeParser=a.dateTimeParser);a.datePickerSettings.isNullValueAccepted=a.isNullValueAccepted;"undefined"===typeof a.datePickerSettings.valueChangeHandler&& +(a.datePickerSettings.valueChangeHandler=a.valueChangeHandler);"undefined"===typeof a.datePickerSettings.popupClass&&(a.datePickerSettings.popupClass=a.popupClass);"undefined"===typeof a.datePickerSettings.popupStyle&&(a.datePickerSettings.popupStyle=a.popupStyle);"undefined"===typeof a.datePickerSettings.inputClass&&(a.datePickerSettings.inputClass=a.inputClass);"undefined"===typeof a.datePickerSettings.inputStyle&&(a.datePickerSettings.inputStyle=a.inputStyle);"undefined"===typeof a.datePickerSettings.disabledDateSelector&& +(a.datePickerSettings.disabledDateSelector=a.disabledDateSelector);"undefined"===typeof a.datePickerSettings.calendarSelectorLevels&&(a.datePickerSettings.calendarSelectorLevels=a.calendarSelectorLevels);"undefined"===typeof a.datePickerSettings.months&&(a.datePickerSettings.months=a.months);"undefined"===typeof a.datePickerSettings.daysOfWeek&&(a.datePickerSettings.daysOfWeek=a.daysOfWeek);"undefined"===typeof a.timePickerSettings&&(a.timePickerSettings={});a.timePickerSettings.theme=a.theme;a.timePickerSettings.isReadOnly= +a.isReadOnly;"undefined"===typeof a.timePickerSettings.isNowLinkVisible&&(a.timePickerSettings.isNowLinkVisible=a.areCurrentLinksVisible);"undefined"===typeof a.timePickerSettings.nowString&&(a.timePickerSettings.nowString="Current");a.timePickerSettings.openDropDownOnInputClick=!1;"undefined"===typeof a.timePickerSettings.isDropDownButtonVisible&&(a.timePickerSettings.isDropDownButtonVisible=a.areDropDownButtonsVisible);"undefined"===typeof a.timePickerSettings.timeFormatter&&"undefined"!==typeof a.datePickerSettings.dateTimeFormatter&& +(a.timePickerSettings.timeFormatter=function(b){var c=new Date(1970,0,1),b=b!=null?a.datePickerSettings.dateTimeFormatter(new Date(c.valueOf()+b)):"",c=b.lastIndexOf(" ");return c<0?"":b.substr(c+1)});"undefined"===typeof a.timePickerSettings.timeParser&&("undefined"!==typeof a.datePickerSettings.dateTimeParser&&"undefined"!==typeof a.datePickerSettings.dateTimeFormatter)&&(a.timePickerSettings.timeParser=function(b){var f=b.lastIndexOf(" ");if(f<0){if(a.isNullValueAccepted)return null;b=new Date; +b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime();return b-Math.floor(b/c.dayDuration)*c.dayDuration}var b=b.substr(f+1),e=a.datePickerSettings.dateTimeFormatter(new Date(1970,0,1)),f=e.indexOf(" ");f>=0&&(e=e.substr(0,f+1));b=a.datePickerSettings.dateTimeParser(e+b);if(isNaN(b.valueOf())||b.getFullYear()<=0||b.getFullYear()!=1970||b.getMonth()!=0||b.getDate()!=1){b=new Date;b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime();return b=b-Math.floor(b/ +c.dayDuration)*c.dayDuration}return b.getTime()-b.getTimezoneOffset()*c.minuteDuration});a.timePickerSettings.isNullValueAccepted=a.isNullValueAccepted;if("undefined"!==typeof a.timePickerSettings.disabledTimeSelector){var b=a.datePickerSettings.disabledDateSelector;a.datePickerSettings.disabledDateSelector=function(d){var f=false;b&&(f=b(d));if(f)return true;d=(new Date(d.valueOf()-d.getTimezoneOffset()*c.minuteDuration)).getTime();d=d-Math.floor(d/c.dayDuration)*c.dayDuration;return a.timePickerSettings.disabledTimeSelector(d)}}"undefined"=== +typeof a.timePickerSettings.popupClass&&(a.timePickerSettings.popupClass=a.popupClass);"undefined"===typeof a.timePickerSettings.popupStyle&&(a.timePickerSettings.popupStyle=a.popupStyle);a.timePickerSettings.inputClass=void 0;a.timePickerSettings.inputStyle=null;"undefined"===typeof a.timePickerSettings.disabledTimeSelector&&(a.timePickerSettings.disabledTimeSelector=a.disabledTimeSelector)};c.prototype.refreshValue=function(){this.datePicker.refreshValue();this.timePicker.refreshValue()};c.prototype.getValue= +function(){return this.datePicker.getValue()};c.prototype.setValue=function(a){this.datePicker.setValue(a)};c.prototype.getTimeValue=function(){return this.timePicker.getValue()};c.prototype.setTimeValue=function(a){this.timePicker.setValue(a)};c.prototype.openDropDown=function(){this.datePicker.openDropDown()};c.prototype.closeDropDown=function(){this.datePicker.closeDropDown()};c.prototype.openTimeDropDown=function(){this.timePicker.openDropDown()};c.prototype.closeTimeDropDown=function(){this.timePicker.closeDropDown()}; +c.prototype.getCurrentValuePart=function(){if(!this.inputElement||!this.inputElement.value)return null;var a=this.inputElement.value.lastIndexOf(" ");return 0>a?"Date":this.inputElement.selectionStart>a?"Time":"Date"};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration;c.dayDuration=24*c.hourDuration;return c}();g.Element=j})(g.DateTimePicker||(g.DateTimePicker={}));var q;(function(g){g.initialize=function(c,a,b,d,f){return new p(c,a,b,d,f)};g.get=function(c){return c.component}; +var p=function(){function c(a,b,d,f,e){this.host=a;this.availableChoices=b;this.value=d;this.settings=f;this.isInitialized=!1;this.dropDownButtonElement=null;var h="DlhSoft.Controls MultiSelectorComboBox DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component=this;"undefined"===typeof f&&(f={});this.settings=f;c.initializeSettings(this.settings);"undefined"===typeof this.settings.choiceStyle&&!(this instanceof j.Element)&&(this.settings.choiceStyle= +"cursor: pointer");var g=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null)null==d&&(d=this.inputHost.value),a=g.createElement("span"),this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost),this.host=a,l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f),this.host.component=this;if("undefined"===typeof b||null==b)b=[];this.availableChoices=b;if("undefined"===typeof d||null==d)d="";this.value=d;this.refresh();this.isInitialized=!0}c.initializeSettings= +function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.autoAppendAvailableChoices&&(a.autoAppendAvailableChoices=!1);"undefined"===typeof a.openDropDownOnInputClick&&(a.openDropDownOnInputClick=!0);"undefined"===typeof a.isDropDownButtonVisible&&(a.isDropDownButtonVisible=!1);"undefined"===typeof a.dropDownButtonDefinition&&(a.dropDownButtonDefinition="\u25bc");"undefined"===typeof a.separator&&(a.separator=",");"undefined"===typeof a.isSpaceSeparated&&(a.isSpaceSeparated=!0);"undefined"===typeof a.delimiters&&(a.delimiters=["["]);"undefined"===typeof a.areCheckBoxesVisible&&(a.areCheckBoxesVisible=!0);"undefined"=== +typeof a.popupStyle&&(a.popupStyle="background-color: White; color: "+("Modern"==a.theme?"#505050":"Black")+"; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small")+"; max-height: 188px; overflow-y: auto");"undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px")};c.prototype.refresh=function(){for(var a= +this,b=this.host.ownerDocument,d=this.host.childNodes.length;0=a.scrollTop&&0=a.scrollHeight-a.clientHeight-1&&0>b))d=!0;if(a==this.popupElement)return d;a=a.parentElement}return!1};c.prototype.getValue=function(){return this.value};c.prototype.setValue=function(a){this.resetValue(a)};c.prototype.refreshValue=function(){this.resetValue()};c.prototype.resetValue= +function(a){this.isDuringInternalSetValue||(this.closeDropDown(),this.setValueInternal(a))};c.prototype.setValueInternal=function(a,b){if(!this.isDuringInternalSetValue){this.isDuringInternalSetValue=!0;"undefined"===typeof b&&(b=!0);var d=this.value,c=this.value="undefined"!==typeof a&&null!=a?a:this.inputElement.value;if(c!=this.inputElement.value&&(this.inputElement.value=c,this.isInitialized))try{var e=this.inputElement.ownerDocument.createEvent("HTMLEvents");e.initEvent("change",!0,!0);this.inputElement.dispatchEvent(e)}catch(h){}if(this.value&& +!d||!this.value&&d||this.value&&d&&this.value.valueOf()!=d.valueOf())b&&this.refreshSelectedChoices(),this.settings.valueChangeHandler&&this.settings.valueChangeHandler(this.value);delete this.isDuringInternalSetValue}};c.prototype.refreshAvailableChoices=function(){if(this.settings.autoAppendAvailableChoices){for(var a=this.getSelectedChoices(!1),b=0;bthis.availableChoices.indexOf(d)&&this.availableChoices.push(d)}this.refreshSelectedChoices()}};c.prototype.getSelectedChoice= +function(a){return this.getSelectedChoices(a)[0]};c.prototype.getSelectedChoices=function(a){"undefined"===typeof a&&(a=!0);for(var b=[],d=this.value.trim(),c=d.split(this.settings.separator),e=0;e=this.availableChoices.length))){(this.isOpen=!this.isOpen)&&this.refreshAvailableChoices();var b= +function(){var b=a.inputElement.getBoundingClientRect();a.popupElement.style.position="fixed";a.popupElement.style.zIndex="1";a.popupElement.style.left=b.left+"px";a.popupElement.style.top=b.top+b.height+"px";a.popupElement.style.minWidth=a.inputElement.offsetWidth+"px";a.popupElement.style.display=a.isOpen?"block":"none";var c=a.popupElement.getBoundingClientRect();c.bottom>a.popupElement.ownerDocument.documentElement.clientHeight&&b.top>=c.height&&(a.popupElement.style.top=b.top-c.height+2+"px"); +c.right>a.popupElement.ownerDocument.documentElement.clientWidth&&a.popupElement.ownerDocument.documentElement.clientWidth>=c.width&&(a.popupElement.style.left=a.popupElement.ownerDocument.documentElement.clientWidth-c.width+"px")};b();this.isOpen&&this.settings.dropDownOpenedHandler?this.settings.dropDownOpenedHandler():!this.isOpen&&this.settings.dropDownClosedHandler&&this.settings.dropDownClosedHandler();if(this.isOpen){var c=this.host.ownerDocument.documentElement.clientWidth,f=this.host.ownerDocument.documentElement.clientHeight, +e=this.host.getBoundingClientRect();this.positionChangeHandlerTimer=setInterval(function(){var h=a.host.ownerDocument.documentElement.clientWidth,g=a.host.ownerDocument.documentElement.clientHeight,k=a.host.getBoundingClientRect();h!=c||g!=f?a.closeDropDown():(k.left!=e.left||k.top!=e.top||k.width!=e.width||k.height!=e.height)&&b();c=h;f=g;e=k},100)}else this.positionChangeHandlerTimer&&(clearInterval(this.positionChangeHandlerTimer),delete this.positionChangeHandlerTimer)}};return c}();g.Element= +p})(q=g.MultiSelectorComboBox||(g.MultiSelectorComboBox={}));var j;(function(g){g.initialize=function(c,a,b,d,f){return new j(c,a,b,d,f)};g.get=function(c){return c.component};var j=function(c){function a(a,d,f,e,h){c.call(this,a,d,f,e,h);this.isInitialized=!1;this.settings.areCheckBoxesVisible=!1;"undefined"===typeof e.choiceStyle&&(e.choiceStyle="padding: 2px; margin-right: -4px; cursor: pointer");"undefined"===typeof e.selectedChoiceStyle&&(e.selectedChoiceStyle="background-color: #3399ff; color: White; margin: -3px; padding: 2px"); +this.refresh();this.isInitialized=!0}__extends(a,c);return a}(q.Element);g.Element=j})(j=g.ComboBox||(g.ComboBox={}));var s;(function(g){g.initialize=function(c,a,b,d,f){return new l(c,a,b,d,f)};g.get=function(c){return c.component};var l=function(c){function a(){c.apply(this,arguments)}__extends(a,c);return a}(j.Element);g.Element=l})(s=g.DropDownList||(g.DropDownList={}));(function(g){g.initialize=function(c,a,b,d){return new j(c,a,b,d)};g.get=function(c){return c["ToolTip.component"]};var j=function(){function c(a, +b,d,f){var e=this;this.content=a;this.targetElement=b;this.settings=d;this.isInitialized=!1;this.isEnabled=!0;this.isVisible=!1;var b=b.ownerDocument,g=b.createElement("span");b.body.appendChild(g);var j="DlhSoft.Controls ToolTip DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[j[5]][j[4]](g,j[0],j[1],j[2],j[3],f,d);a&&a instanceof HTMLElement?(a.parentNode&&a.parentNode.removeChild(a),f=a):(f=b.createElement("span"),f.innerHTML=a);g.appendChild(f);this.host=g;this.contentContainer=f; +this.host["ToolTip.component"]=this;this.contentContainer["ToolTip.component"]=this;this.targetElement["ToolTip.component"]=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings);this.contentContainer.setAttribute("style",this.settings.containerStyle);this.settings.containerClass&&this.contentContainer.setAttribute("class",this.settings.containerClass);this.isEnabled=this.settings.isEnabled;(this.isVisible=this.settings.isVisible)?this.show():this.hide();this.refresh(); +var k=!1;this.targetElement.addEventListener("mouseenter",function(){if(e.isEnabled){e.show();k=true}});this.targetElement.addEventListener("mouseleave",function(){if(e.isEnabled){k=false;isNaN(e.settings.duration)||setTimeout(function(){k||e.hide()},e.settings.duration)}});this.contentContainer.addEventListener("mouseenter",function(){e.isEnabled&&(k=true)});this.contentContainer.addEventListener("mouseleave",function(){if(e.isEnabled){k=false;isNaN(e.settings.duration)||setTimeout(function(){k|| +e.hide()},e.settings.duration)}});this.targetElement.addEventListener("mouseup",function(){e.isEnabled&&e.hide()},!0);b.addEventListener("mousedown",function(){e.isEnabled&&(k||e.hide())},!0);b.addEventListener("mousewheel",function(){e.isEnabled&&e.hide()},!0);b.addEventListener("DOMMouseScroll",function(){e.isEnabled&&e.hide()},!0);this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isEnabled&&(a.isEnabled=!0);"undefined"=== +typeof a.duration&&(a.duration=0);"undefined"===typeof a.isVisible&&(a.isVisible=!1);"undefined"===typeof a.containerStyle&&(a.containerStyle="cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; background-color: "+("Modern"==a.theme?"White":"#ffffc0")+"; color: "+("Modern"==a.theme?"#505050":"Black")+"; font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small")+"; padding: 4px")}; +c.prototype.refresh=function(){var a=this.targetElement.getBoundingClientRect();this.x=a.left;this.y=a.top+a.height;this.contentContainer.style.position="fixed";this.contentContainer.style.zIndex="1";this.contentContainer.style.left=this.x+"px";this.contentContainer.style.top=this.y+"px";this.contentContainer.style.display=this.settings.isVisible?"inline-block":"none";var b=this.contentContainer.getBoundingClientRect();b.bottom>this.contentContainer.ownerDocument.documentElement.clientHeight&&a.top>= +b.height&&(this.contentContainer.style.top=a.top-b.height+2+"px");b.right>this.contentContainer.ownerDocument.documentElement.clientWidth&&this.contentContainer.ownerDocument.documentElement.clientWidth>=b.width&&(this.contentContainer.style.left=this.contentContainer.ownerDocument.documentElement.clientWidth-b.width+"px")};c.prototype.setPosition=function(a,b){this.setHorizontalPosition(a);this.setVerticalPosition(b)};c.prototype.setHorizontalPosition=function(a){this.x=a;this.contentContainer.style.left= +this.x+"px"};c.prototype.setVerticalPosition=function(a){this.y=a;this.contentContainer.style.top=this.y+"px"};c.prototype.enable=function(){this.isEnabled||(this.settings.isEnabled=this.isEnabled=!0)};c.prototype.disable=function(){this.isEnabled&&(this.settings.isEnabled=this.isEnabled=!1)};c.prototype.show=function(){c.previouslyShown&&c.previouslyShown.hide();c.previouslyShown=this;this.isVisible||(this.settings.isVisible=this.isVisible=!0,this.refresh(),this.settings.shownHandler&&this.settings.shownHandler())}; +c.prototype.hide=function(){this.isVisible&&(this.settings.isVisible=this.isVisible=!1,this.refresh(),this.settings.hiddenHandler&&this.settings.hiddenHandler())};c.prototype.setContent=function(a){a&&a instanceof HTMLElement?(a.parentNode&&a.parentNode.removeChild(a),this.host.replaceChild(a,this.contentContainer),this.contentContainer=a):this.contentContainer.innerHTML=a};return c}();g.Element=j})(g.ToolTip||(g.ToolTip={}));(function(k){function j(c,a){for(var b=g.TreeGrid.getDefaultColumns(c,a), +d=0;d +*/ + +declare module DlhSoft.Controls { + /** Represents a control that presents hierarchical data items using a tree-grid. */ + module TreeGrid { + /** + * Initializes a TreeGrid component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Node data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): Column[]; + + function getDefaultCollapsedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + function getDefaultExpandedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function optionSelectColumnTemplateBase(document: HTMLDocument, width: number, optionCollectionGetter: () => any[], valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function numberInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function percentInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function timeSpanInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, scale?: number, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function dateTimeInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function datePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function dateTimePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function multiSelectorComboBoxInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIndexColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + function getWbsColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + + /** Represents an HTML element that supplementary provides TreeGrid component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshGridItems(): void; refreshItems(): void; refreshGridItem(item: Item): void; refreshItem(item: Item): void; refreshItemPath(item: Item): void; refreshItemNeighbourhood(item: Item): void; + + insertItem(index: number, item: Item): void; addItem(item: Item): void; insertItems(index: number, items: Item[]): void; addItems(items: Item[]): void; + removeItem(item: Item): void; removeItems(items: Item[]): void; + moveRange(fromIndex: number, count: number, toIndex: number): void; + moveItem(item: Item, toIndex: number): void; + moveItemHierarchy(item: Item, toIndex: number): void; + moveItemUp(item: Item): void; moveItemDown(item: Item): void; + moveItemHierarchyUp(item: Item): void; moveItemHierarchyDown(item: Item): void; + + increaseItemIndentation(item: Item): void; decreaseItemIndentation(item: Item): void; + + setItemContent(item: Item, value: any): void; + getItemIndexString(item: Item, zeroBased?: boolean): string; + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + expandItem(item: Item): void; collapseItem(item: Item): void; + scrollToItem(item: Item): void; scrollToBottom(): void; + + getItemsHeight(): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + getRootItems(): Item[]; getLeafItems(): Item[]; + + isInitializing: boolean; isInitialized: boolean; + + /** Copies the common settings of the current component instance to the specified target settings collection; a secondary component instance may be initialized using the output collection. */ + copyCommonSettings(targetSettings: Settings): void; + } + + /** Represents a hierarchical data item and its tree-grid node representation. */ + interface Item { + /** The object that is displayed to represent the node item in the grid, usually the node name. */ + content: any; + + /** The hierarchy is based on the indentation level values of the nodes, so that a node with a lower index in the collection and having a specific indentation level will become the node for the nodes with a higher index in the collection and having an increased indentation level. */ + indentation?: number; + + /** If a parent node is expanded its child nodes become visible. If a parent node is collapsed its child nodes become invisible. */ + isExpanded?: boolean; + + isReadOnly?: boolean; + isHidden?: boolean; + isSummaryEnabled?: boolean; + + "class"?: string; style?: string; + + isSelected?: boolean; + + /** The index of the item in the managed hierarchy. */ + index?: number; + + /** The summary item that includes this node considering indentation values, or null when there is no such parent summary item. */ + parent?: Item; + + /** Indicates whether the node is a summary item. */ + hasChildren?: boolean; + + /** When this node is a summary item (i.e. hasChildren is set to true), returns an array of its child items. */ + children?: Item[]; + + /** Indicates whether the node is visible within the hierarchy, i.e. it is not a descendent of a collapsed summary item. */ + isVisible?: boolean; + + /** Indicates whether the node is visible in the scrolling viewport of the control when virtualization is enabled. */ + isVirtuallyVisible?: boolean; + } + + /** Represents settings for a TreeGrid component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the interaction mode to generically apply to the control; Standard, and TouchEnabled interaction modes are supported; by default it is Standard. */ + interaction?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + gridWidth?: string; + splitterWidth?: number; + + isReadOnly?: boolean; isContentReadOnly?: boolean; + + headerBackground?: string; headerHeight?: number; + itemHeight?: number; + + /** Collection of objects indicating the columns to be presented in the grid. */ + columns?: Column[]; + + itemClass?: string; itemStyle?: string; + standardItemClass?: string; summaryItemClass?: string; standardItemStyle?: string; summaryItemStyle?: string; + + selectedItemClass?: string; selectedItemStyle?: string; + + /** Indicates the selection behavior; support values are None (not allowed), Focus (single item selected triggered by focus), Single (single item selection using check box), Extended (multiple item selection using check boxes), and ExtendedFocus (multiple item selection using check boxes or triggered by focus); by default it is set to Focus. */ + selectionMode?: string; + + indentationLevelWidth?: number; + + cellClass?: string; cellStyle?: string; + toggleButtonClass?: string; toggleButtonHoveringClass?: string; toggleButtonStyle?: string; toggleButtonHoveringStyle?: string; + collapsedToggleButtonTemplate? (): HTMLElement; expandedToggleButtonTemplate? (): HTMLElement; + + visibilityFilter? (item: Item): boolean; + + allowUserToResizeColumns?: boolean; + minColumnWidth?: number; + maxColumnWidth?: number; + + alternativeItemClass?: string; alternativeItemStyle?: string; + + gridLines?: string; horizontalGridLines?: string; verticalGridLines?: string; + + /** Indicates whether the control will populate grid rows only when they need to be presented (such as only when scrolling the view to their positions); by default it is set to true for optimization purposes. */ + isVirtualizing?: boolean; + + /** Function called whenever the end user resizes a grid column, changing its width (column.width). */ + columnWidthChangeHandler? (column: Column, width: number): void; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control, when using the default grid columns. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + /** Function called whenever summary item expansion state changes within the control, providing the expanded or collapsed item, and a Boolean value indicating the updated expansion state, specified as parameters. */ + itemExpansionChangeHandler? (item: Item, isExpanded: boolean): void; + /** Function called whenever item selection changes within the control, providing the selected or unselected item, a Boolean value indicating the updated selection state, and a Boolean value indicating whether this change was directly triggered by the user, specified as parameters. */ + itemSelectionChangeHandler? (item: Item, isSelected: boolean, isDirect: boolean): void; + + /** Function called whenever an item is moved in the managed list of the control, providing the item, source and target positions of the item, specified as parameters. */ + itemMoveHandler? (item: Item, fromIndex: number, toIndex: number): void; + } + + /** Represents a grid column displayed by the TreeGrid component. */ + interface Column { + isTreeView?: boolean; + + header: any; + width: number; minWidth?: number; maxWidth?: number; + + isReadOnly?: boolean; allowUserToResize?: boolean; + isSelection?: boolean; + + headerClass?: string; headerStyle?: string; + cellClass?: string; cellStyle?: string; + + /** Function that returns the output (document node) to be presented within the grid cell of this column in the standard view, for a specific item received as parameter. */ + cellTemplate(item: Item): HTMLElement; + + exportCellTemplate? (item: Item): HTMLElement; + } + + /** Represents export settings for a TreeGrid component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + columnIndexes?: number[]; + startRowIndex?: number; endRowIndex?: number; + rotate?: boolean; + autoClose?: boolean; + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.HierarchicalData.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.HierarchicalData.HTML.Controls.js new file mode 100644 index 000000000..9736168c3 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.HierarchicalData.HTML.Controls.js @@ -0,0 +1,116 @@ +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.HierarchicalData.HTML.Controls",company:"DlhSoft",product:"Hierarchical Data Modern Library",version:"5.3.6.0",copyright:"Copyright \u00a9 2012-2015 DlhSoft",title:"Hierarchical Data HTML Controls",description:"Hierarchical Data related HTML client components"}); +DlhSoft.buildReleaseDate=function(y,u,A){y=new Date(y,u-1,A);return y>DlhSoft.buildReleaseDate?y:DlhSoft.buildReleaseDate}(2015,9,22);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var y=_0x5c25[1],u=_0x5c25[2],A=[],K=[],E=_0x5c25[3],G=function(x,s){if(typeof x!==u||typeof s!==u)return!1;if(s==E)return!0;var B=s[_0x5c25[11]](_0x5c25[10]);if(0<=B){var q=s[_0x5c25[12]](0,B),n,t=q[_0x5c25[11]](_0x5c25[10]);if(0<=t)try{n=new Date(parseInt(q[_0x5c25[12]](t+1)))}catch(p){}typeof n===y&&(n=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>n)return!1;q=q+_0x5c25[10]+x;for(i=n=0;in&&(n=Math[_0x5c25[15]](2,32)-n);q=n.toString(16)[_0x5c25[16]]();B=s[_0x5c25[12]](B+1);if(q==B)return!0}return!1},H=function(x,s,u,q,n){var t=_0x5c25[17],p=_0x5c25[18],z=typeof ComponentSource===y||!ComponentSource?p+_0x5c25[19]+q+_0x5c25[20]+n:_0x5c25[21],A=q+_0x5c25[22]+n+_0x5c25[23],E=_0x5c25[24],G=_0x5c25[25],H=_0x5c25[26];setTimeout(function(){var n=x[_0x5c25[27]],p=n[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var q=n[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);q[_0x5c25[35]](r);r[_0x5c25[35]](n[_0x5c25[36]](t));q[_0x5c25[35]](n[_0x5c25[36]](E+_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);r[_0x5c25[35]](n[_0x5c25[36]](s));q[_0x5c25[35]](r);q[_0x5c25[35]](n[_0x5c25[36]](G+_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);r[_0x5c25[35]](n[_0x5c25[36]](A));q[_0x5c25[35]](r);q[_0x5c25[35]](n[_0x5c25[36]](H+ +_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var w=n[_0x5c25[29]](_0x5c25[39]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);w[_0x5c25[32]](_0x5c25[41],z);w[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);w[_0x5c25[35]](n[_0x5c25[36]](_0x5c25[44]));r[_0x5c25[35]](w);w=n[_0x5c25[29]](_0x5c25[39]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);w[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);w[_0x5c25[35]](n[_0x5c25[36]](_0x5c25[47]));w[_0x5c25[50]](_0x5c25[48],function(){x[_0x5c25[49]](p);K[_0x5c25[7]](u)}, +!1);r[_0x5c25[35]](w);q[_0x5c25[35]](r);p[_0x5c25[35]](q);x[_0x5c25[35]](p)},0);setTimeout(function(){alert(t+_0x5c25[51]+E+_0x5c25[52]+s+_0x5c25[51]+G+_0x5c25[53]+A+_0x5c25[51]+H+_0x5c25[4])},6E5)};return{setLicense:function(u,s){A[_0x5c25[7]]({type:u,content:s})},validate:function(x,s,B,q,n,t,p){for(var s=s+_0x5c25[4]+B,z=0;z0?"auto":c.itemHeight+"px";else{var e=a.clientHeight- +c.headerHeight-2;e<0&&(e=0);d=e+"px";if(e0?"auto":c.itemHeight+"px"}a.isContentHeightInitialized=true}return d},H=function(a,b){if(typeof b.toggleButtonAreaWidth!=="undefined")return b.toggleButtonAreaWidth;for(var c=0,d=0;d0){c=16;break}return b.toggleButtonAreaWidth=c},x=function(a,b){var c=a.createElement("span");c.innerHTML=b;return c},s=function(a,b){var c=a.ownerDocument,d= +c.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("style","width: 12px; height: 12px");d.setAttribute("focusable","false");c=c.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("id","PART_Border");c.setAttribute("width","12");c.setAttribute("height","12");c.setAttribute("style","fill: White; fill-opacity: 0");d.appendChild(c);a.setAttribute("id","PART_Button");typeof b.toggleButtonClass!=="undefined"&&a.setAttribute("class",b.toggleButtonClass);typeof b.toggleButtonStyle!== +"undefined"&&a.setAttribute("style",b.toggleButtonStyle);d.appendChild(a);return d},B=function(a,b){typeof b!=="object"&&(b={});A(b);var c=[{header:"",width:32,isSelection:true},{header:"Item",width:280,isTreeView:true}];c[0].cellTemplate=q(b,c[0],a);c[1].cellTemplate=z(b,c[1],a);c[1].exportCellTemplate=z(b,c[1],a,false);b.selectionMode!="Single"&&(b.selectionMode!="Extended"&&b.selectionMode!="ExtendedFocus")&&c.splice(0,1);return c},q=function(a,b,c){return function(d){return!b.isReadOnly?n(d,a, +c):getBooleanNode(d.treeGrid.ownerDocument,d.isSelected)}},n=function(a,b){var c=a.treeGrid.ownerDocument,d;if(typeof a.selectionInput==="undefined"){d=c.createElement("input");a.selectionInput=d;d.type="checkbox";d.setAttribute("style","margin: 0px")}else d=a.selectionInput;if(a.isSelected){d.setAttribute("checked","checked");if(!d.checked)d.checked=true}else if(d.checked)d.checked=false;var e=function(){d.checked?t(a,true,b.selectionMode):t(a,false,b.selectionMode)};typeof d.changeEventListener!== +"undefined"&&d.removeEventListener("change",d.changeEventListener,true);d.addEventListener("change",e,true);d.changeEventListener=e;c=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();e(a)}};typeof d.keyPressEventListener!=="undefined"&&d.removeEventListener("keypress",d.keyPressEventListener,true);d.addEventListener("keypress",c,true);d.keyPressEventListener=c;return d},t=function(a,b,c){a.isSelected=b;v(a,"isSelected",true,true);aa(a);if(typeof a.treeGrid!=null){a.treeGrid.selectedItem= +a;if(c!="Extended"&&c!="ExtendedFocus")a.treeGrid.selectedItems=[a];var d;if(c!="Extended"&&c!="ExtendedFocus")for(d=0;d=1&&(typeof c.allowUserToResizeColumns=== +"undefined"||c.allowUserToResizeColumns)&&(typeof b.allowUserToResize==="undefined"||b.allowUserToResize)){d.isGripperVisible=false;var h=b.treeGrid,g=function(a){d.isGripperVisible=a;d.style.cursor=a?"e-resize":"default";d.style.borderRight=a?"solid 1px "+c.border:"";e.style.width=b.width-(a?1:0)+"px"},j=c.splitterWidth;d.addEventListener("mouseover",function(a){if(!DlhSoft.Controls.TreeGrid.isGripperDragging&&!(d.isGripperDragging||typeof a.offsetX==="undefined"&&a.currentTarget!=d))g((typeof a.offsetX!== +"undefined"?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=b.width-j)},true);d.addEventListener("mousemove",function(a){if(!DlhSoft.Controls.TreeGrid.isGripperDragging&&!(d.isGripperDragging||typeof a.offsetX==="undefined"&&a.currentTarget!=d))g((typeof a.offsetX!=="undefined"?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=b.width-j)},true);e.addEventListener("mouseover",function(a){!DlhSoft.Controls.TreeGrid.isGripperDragging&&(!d.isGripperDragging&&!(typeof a.offsetX!=="undefined"||a.currentTarget!= +e))&&g(a.layerX-a.currentTarget.offsetLeft>=b.width-j)},false);e.addEventListener("mousemove",function(a){!DlhSoft.Controls.TreeGrid.isGripperDragging&&(!d.isGripperDragging&&!(typeof a.offsetX!=="undefined"||a.currentTarget!=e))&&g(a.layerX-a.currentTarget.offsetLeft>=b.width-j)},false);d.addEventListener("mousedown",function(a){if(!(a.button!=0||!d.isGripperVisible||DlhSoft.Controls.TreeGrid.isGripperDragging)){DlhSoft.Controls.TreeGrid.isGripperDragging=true;d.isGripperDragging=true;d.initialGripperDraggingX= +a.clientX;d.initialColumnWidth=b.width}},true);a.addEventListener("mousemove",function(a){if(d.isGripperDragging){b.width=Math.max(b.minWidth,d.initialColumnWidth+(a.clientX-d.initialGripperDraggingX));if(typeof b.maxWidth!=="undefined"&&b.width>b.maxWidth)b.width=b.maxWidth;e.style.width=b.width-1+"px";typeof c.columnWidthChangeHandler!=="undefined"&&setTimeout(function(){c.columnWidthChangeHandler(b,b.width)},0);if(!h.isWaitingToRefreshColumns){h.isWaitingToRefreshColumns=true;setTimeout(function(){var a= +U(c.columns);h.gridHeader.style.width=a+"px";h.gridContent.style.width=a+"px";delete h.isWaitingToRefreshColumns;h.refreshGridItems()},0)}}},true);a.addEventListener("mouseup",function(){if(d.isGripperDragging){delete d.isGripperDragging;delete d.initialGripperDraggingX;delete d.initialColumnWidth;g(false);delete DlhSoft.Controls.TreeGrid.isGripperDragging}},true);d.addEventListener("mouseout",function(){d.isGripperDragging||g(false)},false)}return d},N=function(a,b){for(var c=-1,d=null,e=null,f= +[],h=0;hj){g.indentation=j;v(g,"indentation",false,true)}d.hasChildren=g.indentation>d.indentation;if(d.hasChildren&&typeof d.isMilestone!=="undefined"&& +d.isMilestone){d.isMilestone=false;v(d,"isMilestone",false,true)}}g.isVisible=c<0||g.indentation<=c;if(g.isVisible&&!g.isExpanded)c=g.indentation;g.isExpanded&&g.indentation==c&&(c=-1);d=g}if(d!=null)d.hasChildren=false;b.selectedItem=e;b.selectedItems=f},O=function(a,b,c){c.isHierarchicalInformationInitialized=false;var b=[],d,e;for(e=0;e0&&(f=b[b.length-1]);f!=null&&d.indentation<=f.indentation;){b.pop();f=b[b.length-1]}d.parent=f;d.children= +[];f!=null&&f.children.push(d);(f==null||d.indentation>f.indentation)&&b.push(d)}c.isHierarchicalInformationInitialized=true},r=function(a,b,c,d,e){for(var f=0,h=0;h0;)if(g.indexOf(a.childNodes[m])>=0){o=m;break}for(m=a.childNodes.length;m-- > +0;)a.removeChild(a.childNodes[m]);for(m=0;m=0&&setTimeout(function(){try{for(var b=a.childNodes[o];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(c){}},0)};if(b.wasGridItemContentLoaded)setTimeout(g,0);else{g(); +b.wasGridItemContentLoaded=true}}},W=function(a){if(typeof a.isWaitingToRefreshGridItem==="undefined"){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!=="undefined"&&Q(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings);V(a,a.treeGrid.items,a.treeGrid.settings);delete a.isWaitingToRefreshGridItem},0)}},ta=function(a,b,c,d,e,f){var h=b.treeGrid.ownerDocument;(!f.isVirtualizing||typeof b.isVirtuallyVisible!== +"undefined"&&b.isVirtuallyVisible)&&setTimeout(function(){if(typeof b.gridItemSelectionContainer!=="undefined"){var g=b.gridItemSelectionContainer;typeof f.selectedItemClass!=="undefined"&&g.setAttribute("class",b.isSelected?f.selectedItemClass:null);typeof f.selectedItemStyle!=="undefined"&&g.setAttribute("style",b.isSelected?f.selectedItemStyle:null)}var g=[],j=null;try{j=h.activeElement}catch(m){}for(;j!=null&&j!=b.gridItem;){g.push(j);j=j.parentNode}for(var k=-1,j=a.childNodes.length;j-- >0;)if(a.childNodes[j].isSelection&& +g.indexOf(a.childNodes[j])>=0){k=j;break}for(j=a.childNodes.length;j-- >0;)a.childNodes[j].isSelection&&a.removeChild(a.childNodes[j]);for(j=0;j=0&&setTimeout(function(){try{for(var b=a.childNodes[k];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0]; +b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(c){}},0)},0)},aa=function(a){typeof a.gridItem!=="undefined"&&ta(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings)},ca=function(a,b,c,d,e){var f=a.treeGrid.ownerDocument,h=f.createElement("div"),g=0;c.isTreeView==true&&(g=e.indentationLevelWidth*a.indentation);h.setAttribute("style","overflow: hidden; vertical-align: middle; display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing; margin: 0px; padding: 0px; width: "+ +c.width+"px; height: "+e.itemHeight+"px; padding-left: "+g+"px");var j=f.createElement("div");typeof c.cellClass!=="undefined"?j.setAttribute("class",c.cellClass):typeof e.cellClass!=="undefined"&&j.setAttribute("class",e.cellClass);typeof c.cellStyle!=="undefined"?j.setAttribute("style",c.cellStyle):typeof e.cellStyle!=="undefined"&&j.setAttribute("style",e.cellStyle);var m=f.createElement("div");m.setAttribute("style","white-space: nowrap; overflow: hidden; margin: 0px; padding: 0px; width: "+(c.width- +g-16)+"px");if(c.isTreeView==true){g=f.createElement("div");g.setAttribute("style","display: inline-block; width: "+d+"px");if(a.hasChildren){d=f.createElement("div");d.setAttribute("style","cursor: default; padding-left: 1px; font-size: 12px; display: inline-block");f=e.collapsedToggleButtonTemplate;if(a.isExpanded)f=e.expandedToggleButtonTemplate;f=f();d.appendChild(f);da(d,a,b,f,null,null,e);g.appendChild(d)}m.appendChild(g)}a=c.cellTemplate(a);m.appendChild(a);j.appendChild(m);h.appendChild(j); +h.isSelection=c.isSelection;return h},Z=function(a,b){return function(){var c=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");c.setAttribute("points","3.5,2.5 3.5,11.5 10.5,6.5");return s(c,b)}},$=function(a,b){return function(){var c=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");c.setAttribute("points","2.5,3.5 11.5,3.5 6.5,10.5");return s(c,b)}},da=function(a,b,c,d,e,f,h){if(typeof e==="undefined"||e==null)e=d.querySelector("#PART_Button");e!=null&& +ea(e,e,h);if(typeof f==="undefined"||f==null)f=d.querySelector("#PART_Border");f!=null&&ea(f,e,h);c={toggleButton:a,item:b,items:c,content:d,settings:h};if(e!=null){e.tag=c;(typeof h.isExport==="undefined"||!h.isExport)&&e.addEventListener("mouseup",X,true)}if(f!=null){f.tag=c;(typeof h.isExport==="undefined"||!h.isExport)&&f.addEventListener("mouseup",X,true)}a.tag=c;e==null&&(f==null&&(typeof h.isExport==="undefined"||!h.isExport))&&a.addEventListener("mouseup",X,true);d.addEventListener("keypress", +function(a){if(a.keyCode==32){a.preventDefault();a.stopPropagation();C(b,!b.isExpanded,true)}},true);b.toggleButton=a},ea=function(a,b,c){if(!(typeof c.isExport!=="undefined"&&c.isExport)){a.addEventListener("mouseover",function(){typeof c.toggleButtonHoveringClass!=="undefined"&&b.setAttribute("class",c.toggleButtonHoveringClass);typeof c.toggleButtonHoveringStyle!=="undefined"&&b.setAttribute("style",c.toggleButtonHoveringStyle)},true);a.addEventListener("mouseout",function(){b.setAttribute("class", +c.toggleButtonClass);b.setAttribute("style",c.toggleButtonStyle)},true)}},X=function(a){a.stopPropagation();a=a.target.tag.item;C(a,!a.isExpanded,true)},C=function(a,b,c,d){if(a.isExpanded!=b){a.isExpanded=b;(typeof d==="undefined"||d)&&v(a,"isExpanded",c,true);fa(a)}},fa=function(a,b){if(typeof a.toggleButton==="undefined")(typeof b==="undefined"||b)&&setTimeout(function(){fa(a,false)},0);else{var c=a.toggleButton,d=c.tag,e=d.settings,f=e.expandedToggleButtonTemplate,h=e.collapsedToggleButtonTemplate; +a.isExpanded&&(h=f);var f=h(),h=f.querySelector("#PART_Button"),g=f.querySelector("#PART_Border");c.replaceChild(f,d.content);d.content=f;d=d.items;da(c,a,d,f,h,g,e);a.isVisible&&!(typeof a.isHidden!=="undefined"&&a.isHidden)&&ua(d,a,e);P(d,e)}},ua=function(a,b,c){var d=-1,e=false,f=false,h=false,g=0,j,m,k;for(m=0;m=0&&R(b[c]);R(a);c=a.index+ +1;c=b.gridHeaderContainer.clientHeight+b.gridContentContainer.clientHeight-24){c=b.gridContentContainer.scrollTop;b.gridContentContainer.scrollTop=b.gridContentContainer.scrollTop+20;if(typeof b.isDuringVerticalScrolling=== +"undefined"){b.isDuringVerticalScrolling=true;setTimeout(function(){d=b.gridContentContainer.scrollTop-c;b.draggingInitialThumbPosition=b.draggingInitialThumbPosition+d;delete b.isDuringVerticalScrolling},0)}}}},ga=function(a){var b=a.itemTop-a.treeGrid.gridContentContainer.scrollTop;if(b<0)a.treeGrid.gridContentContainer.scrollTop=a.itemTop;else if(b>a.treeGrid.gridContentContainer.clientHeight-a.treeGrid.settings.itemHeight)a.treeGrid.gridContentContainer.scrollTop=a.itemTop-(a.treeGrid.gridContentContainer.clientHeight- +a.treeGrid.settings.itemHeight)},sa=function(a,b,c,d,e,f,h,g){b.addEventListener("scroll",function(){if(d.scrollLeft!=b.scrollLeft)d.scrollLeft=b.scrollLeft;I(h,b,g)},true);ha(b,c,e,g);typeof a.updateGridHeaderTimer!=="undefined"&&clearInterval(a.updateGridHeaderTimer);a.updateGridHeaderTimer=setInterval(function(){try{ha(b,c,e,g)}catch(d){try{clearInterval(a.updateGridHeaderTimer)}catch(f){}}},100);window.addEventListener("mousewheel",function(){try{a.cancelDrag=true}catch(b){}},true)},ha=function(a, +b,c,d){setTimeout(function(){try{var e=b.clientWidth-a.clientWidth;e<0&&(e=0);var f=e+"px";if(c.style.width!=f){c.style.width=f;if(e>0){c.style.boxSizing="border-box";c.style.MozBoxSizing="border-box";c.style.border="solid 1px "+d.border;c.style.borderTop="none";c.style.borderRight="none"}else{c.style.border="";c.style.borderTop="";c.style.borderRight="";c.style.boxSizing="";c.style.MozBoxSizing=""}}}catch(h){}},0)},I=function(a,b,c){if(c.isVirtualizing)for(var d=b.scrollTop-c.itemHeight,b=d+b.clientHeight+ +2*c.itemHeight,e=0;e=d&&f.itemTop=b))&&delete f.isVirtuallyVisible}},ra=function(a,b){for(var c=a.childNodes.length;c-- >0;)a.removeChild(a.childNodes[c]);a.appendChild(b)},Y=function(a,b,c,d){var e=d.indexOf(a);if(!(e<0||b<0||b==e||b>=d.length)){d.splice(e,1);d.splice(b,0,a);ia(d);u(c);typeof c.settings.itemMoveHandler!=="undefined"&&c.settings.itemMoveHandler(a,e,b)}},T=function(a,b,c,d,e){if(!(a<0||c<0||c==a||c>e.length-b)){var f=[],h;for(h=a;h< +a+b;h++)f.push(e[h]);e.splice(a,b);for(h=0;hb){d.indentation=b;v(d,"indentation",false,true)}b=d.indentation+1}},xa=function(a,b,c,d,e,f,h,g,j,m){a.addEventListener("mousedown",function(c){if(c.button==0){delete d.cancelDrag;d.draggingItem=b;d.dragType="Ordering"; +d.style.cursor=a.style.cursor;d.draggingInitialY=c.clientY;d.draggingInitialThumbPosition=0;c.preventDefault()}},true);if(typeof d.draggableOrderingItems==="undefined")d.draggableOrderingItems=[];for(var k=false,o=0;oe+1)){n={content:f.content,indentation:f.indentation,"class":f["class"],style:f.style,isSummaryEnabled:f.isSummaryEnabled,isHidden:f.isHidden,isExported:true,tag:f};ya(n,f);a.push(n);f.exportItem=n}}var s=D.createElement("p");s.innerHTML=typeof b!=="undefined"? +b:"";D.body.appendChild(s);var r=D.createElement("div");r.setAttribute("style","width: "+q+"px");try{DlhSoft.Controls.TreeGrid.initialize(r,a,k,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(u){}setTimeout(function(){t&&D.body.setAttribute("style","margin: 0px");var a=D.createElement("div");a.appendChild(r);D.body.replaceChild(a,s);if(g){a.setAttribute("style","width: "+r.offsetHeight+"px; height: "+ +q+"px; overflow: hidden");a=Math.round((r.offsetWidth-r.offsetHeight)/2);r.setAttribute("style","width: "+q+"px; transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px); -webkit-transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px)")}D.close();if(typeof p!==void 0){p.focus();if(typeof h!=="undefined"&&h){p.print();(typeof j==="undefined"||j)&&p.close()}}},0)},ka=function(a,b,c){typeof c==="undefined"&&(c=false);var d=a.parent,e=a.index;if(d==null){for(d=0;e-- >0;){a=b[e];a.indentation== +0&&d++}return d+(!c?1:0)}return ka(d,b)+"."+(d.children.indexOf(a)+(!c?1:0))},pa=function(a,b,c){var d;for(d=0;d0?b[e-1]:null;h=h!=null?h.indentation+1:0;if(d.indentation>h)d.indentation=h}else if(typeof d.indentation==="undefined"||d.indentationh.indentation)d.indentation=h.indentation;E([d],c);b.splice(e,0,d);N(b,a);O(b,c,a);var g,j=null;if(e0){for(g=b[f-1];g.parent!=null;)g=g.parent;j=g.isExpanded;d.hasChildren&&C(g,d.isExpanded,false,true);g.indentation>=d.indentation&&(g=null)}else b[0].isExpanded||C(b[0],true,false,true);var m=f+1d.indentation)&&C(m,true,false,true);var k=m!=null?m.indentation:null;b.splice(f,1);N(b,a);O(b,c,a);typeof d.gridItemContainer!=="undefined"&&a.gridContent.removeChild(d.gridItemContainer); +m=f=b.length&&(f=b.length-1);f>=0&&M(b[f],b,a,c);I(b,a.gridContentContainer,c)};a.removeItems=function(b){for(var c=0;c0?a.items[d.index-1]:null;if(!(f==null||d.indentation>f.indentation)){C(d,true,false,true);d.indentation++;v(d,"indentation",true,true);S(b,c)&&L(b);for(M(d,b,a,c);d!=null;){d.isExpanded||C(d,true,false);d=d.parent}}};a.decreaseItemIndentation=function(d){var f=d.index=b.length-1||Y(c,d+1,a,b)};a.moveItemHierarchy= +function(c,d){for(var h=b.indexOf(c),g=h+1;g0;){if(b[g].indentation100&&(a=100);d(a)},e,f,h)},timeSpanInputColumnTemplateBase:function(a,b,c,d,e,f,h,g){typeof e==="undefined"&& +(e=1);return DlhSoft.Controls.TreeGrid.numberInputColumnTemplateBase(a,b,function(){var a=c()/(hourDuration*e);return Math.round(a*100)/100},function(a){a=parseFloat(a);a<0&&(a=0);d(a*hourDuration*e)},f,h,g)},datePickerInputColumnTemplateBase:function(a,b,c,d,e,f,h,g,j,m,k,o,n){k||(k=["Su","Mo","Tu","We","Th","Fr","Sa"]);o||(o=function(a){return a.toString()});n||(n=function(a){return new Date(a)});var l=a.createElement("input");l.setAttribute("type","text");c=c();typeof c==="undefined"?c="":c!=null&& +(c=o(c));l.setAttribute("value",c);DlhSoft.Controls.DatePicker&&l.addEventListener("focus",function(){var b=DlhSoft.Controls.DatePicker.get(l);if(!b||!b.isOpen){var c=0,d=0;try{c=l.selectionStart;d=l.selectionEnd}catch(e){}b=DlhSoft.Controls.DatePicker.initialize(l,void 0,{inputStyle:null,defaultTimeOfDay:g,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:j,months:m,daysOfWeek:getAbbreviations(k),dateTimeFormatter:o, +dateTimeParser:n},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{l.selectionStart=c;l.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{l.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);l.dispatchEvent(b)})}},true);c= +"";typeof f!=="undefined"&&!f()&&(c="; display: none");f="";typeof h!=="undefined"&&h()&&(f="; font-weight: bold");l.setAttribute("style","background-color: Transparent; width: "+b+"px; border-width: 0px; padding: 0px"+c+f);typeof e!=="undefined"&&!e()&&l.setAttribute("disabled","true");var p=function(){var a=l.value,a=a!=""?n(a):null;d(a)};l.addEventListener("change",function(){p()},true);l.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();p()}},true); +l.addEventListener("focus",function(){l.style.backgroundColor="White"},true);l.addEventListener("blur",function(){l.style.backgroundColor="Transparent"},true);return l},dateTimePickerInputColumnTemplateBase:function(a,b,c,d,e,f,h,g,j,m,k,o,n){k||(k=["Su","Mo","Tu","We","Th","Fr","Sa"]);o||(o=function(a){return a.toString()});n||(n=function(a){return new Date(a)});var l=a.createElement("input");l.setAttribute("type","text");c=c();typeof c==="undefined"?c="":c!=null&&(c=o(c));l.setAttribute("value", +c);(DlhSoft.Controls.DateTimePicker||DlhSoft.Controls.DatePicker)&&l.addEventListener("focus",function(){var b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(l);if(!b||!b.isOpen){var c=0,d=0;try{c=l.selectionStart;d=l.selectionEnd}catch(e){}b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(l,void 0,{inputStyle:null,defaultTimeOfDay:g,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0", +calendarSelectorLevels:j,months:m,daysOfWeek:getAbbreviations(k),dateTimeFormatter:o,dateTimeParser:n},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{l.selectionStart=c;l.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{l.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents"); +b.initEvent("blur",true,false);l.dispatchEvent(b)})}},true);c="";typeof f!=="undefined"&&!f()&&(c="; display: none");f="";typeof h!=="undefined"&&h()&&(f="; font-weight: bold");l.setAttribute("style","background-color: Transparent; width: "+b+"px; border-width: 0px; padding: 0px"+c+f);typeof e!=="undefined"&&!e()&&l.setAttribute("disabled","true");var p=function(){var a=l.value,a=a!=""?n(a):null;d(a)};l.addEventListener("change",function(){p()},true);l.addEventListener("keypress",function(a){if(a.keyCode== +13){a.preventDefault();a.stopPropagation();p()}},true);l.addEventListener("focus",function(){l.style.backgroundColor="White"},true);l.addEventListener("blur",function(){l.style.backgroundColor="Transparent"},true);return l},multiSelectorComboBoxInputColumnTemplateBase:function(a,b,c,d,e,f,h,g){var j=a.createElement("input");j.setAttribute("type","text");d=d();typeof d==="undefined"&&(d="");j.setAttribute("value",d);DlhSoft.Controls.MultiSelectorComboBox&&j.addEventListener("focus",function(){var b= +DlhSoft.Controls.MultiSelectorComboBox.get(j);if(!b||!b.isOpen&&b.availableChoices.length>0){var b=c(),d=0,e=0;try{d=j.selectionStart;e=j.selectionEnd}catch(f){}b=DlhSoft.Controls.MultiSelectorComboBox.initialize(j,b,void 0,{inputStyle:null,autoAppendAvailableChoices:false,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0; color: Black; font-size: small; max-height: 188px; overflow-y: auto"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); +b.openDropDown();setTimeout(function(){try{j.selectionStart=d;j.selectionEnd=e}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{j.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);j.dispatchEvent(b)})}},true);d="";typeof h!=="undefined"&&!h()&&(d="; display: none");h="";typeof g!=="undefined"&&g()&&(h="; font-weight: bold");j.setAttribute("style","background-color: Transparent; width: "+ +b+"px; border-width: 0px; padding: 0px"+d+h);typeof f!=="undefined"&&!f()&&j.setAttribute("disabled","true");j.addEventListener("change",function(){e(j.value)},true);j.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();e(j.value)}},true);j.addEventListener("focus",function(){j.style.backgroundColor="White"},true);j.addEventListener("blur",function(){j.style.backgroundColor="Transparent"},true);return j},dateTimeInputColumnTemplateBase:function(a,b,c,d, +e,f,h){return DlhSoft.Controls.TreeGrid.textInputColumnTemplateBase(a,b,function(){var a=c();return a!=null?a.toString():""},function(a){a=a!=""?new Date(a):null;d(a)},e,f,h)},getIndexColumnTemplate:function(){return function(a){var b=a.treeGrid;return DlhSoft.Controls.TreeGrid.textColumnTemplateBase(b.ownerDocument,function(){return b.getItemIndexString(a)})}},getWbsColumnTemplate:function(a){return function(b){var c=b.treeGrid;return DlhSoft.Controls.TreeGrid.textColumnTemplateBase(c.ownerDocument, +function(){return c.getItemWbsIndexString(b,a)})}},getIconColumnTemplate:function(a,b,c,d,e,f,h,g,j){if(typeof a==="string")var m=a,a=function(){return m};typeof d==="undefined"||d==false?d=function(){return false}:d==true&&(d=function(){return true});return function(k){var m=k.treeGrid,n=m.ownerDocument.createElement("img");n.setAttribute("src",a(k));typeof b!=="undefined"&&n.setAttribute("class",b);typeof c!=="undefined"&&n.setAttribute("style",c);if(!m.settings.isReadOnly&&d(k)){n.style.cursor= +"move";xa(n,k,m.items,m,m.settings,e,f,h,g,j)}return n}}}}()); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Components.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Components.ts new file mode 100644 index 000000000..3b388a74d --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Components.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ElementRef, Input } from '@angular/core'; +import GanttChartItem = DlhSoft.Controls.GanttChartView.Item; +import GanttChartSettings = DlhSoft.Controls.GanttChartView.Settings; +import ScheduleChartItem = DlhSoft.Controls.ScheduleChartView.Item; +import ScheduleChartSettings = DlhSoft.Controls.ScheduleChartView.Settings; +import LoadChartItem = DlhSoft.Controls.LoadChartView.Item; +import LoadChartSettings = DlhSoft.Controls.LoadChartView.Settings; + +@Component({ + selector: 'ganttchartview', + template: '
' +}) +export class GanttChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: GanttChartItem[] = []; + @Input() settings: GanttChartSettings = {}; + @Input() license: string; + @Input() change: (item: GanttChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.GanttChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} + +@Component({ + selector: 'schedulechartview', + template: '
' +}) +export class ScheduleChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: ScheduleChartItem[] = []; + @Input() settings: ScheduleChartSettings = {}; + @Input() license: string; + @Input() change: (item: GanttChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.ScheduleChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} + +@Component({ + selector: 'loadchartview', + template: '
' +}) +export class LoadChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: LoadChartItem[] = []; + @Input() settings: LoadChartSettings = {}; + @Input() license: string; + @Input() change: (item: GanttChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.LoadChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Directives.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Directives.js new file mode 100644 index 000000000..e628d44a8 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Directives.js @@ -0,0 +1,60 @@ +// Version 1.0.0.0. +var module = angular.module("DlhSoft.ProjectData.GanttChart.Directives", []); +dsDefinePDGCDirective(module, "GanttChart"); +dsDefinePDGCDirective(module, "ScheduleChart"); +dsDefinePDGCDirective(module, "LoadChart"); +function dsDefinePDGCDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls[controlName ? controlName : directiveName + "View"].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function() { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.d.ts new file mode 100644 index 000000000..4614e1c4f --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.d.ts @@ -0,0 +1,86 @@ +/// +declare module DlhSoft.Controls.GanttChartView.ProjectSerializer { + function initialize(control: GanttChartView.Element, settings?: Settings): Service; + class Service { + public control: GanttChartView.Element; + public settings: Settings; + constructor(control: GanttChartView.Element, settings?: Settings); + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + private static weekDuration; + public loadXml(xml: string): void; + public importXml(input: any): void; + private static parseXmlToTimeSpan(value); + private static parseXmlToDateTime(value); + private static indexOfKey(dictionary, key); + static projectXmlTemplate: string; + static scheduleWeekDayXmlTemplate: string; + static scheduleDayWorkingTimesXmlTemplate: string; + static taskXmlTemplate: string; + static predecessorXmlTemplate: string; + static resourceXmlTemplate: string; + static assignmentXmlTemplate: string; + public getXml(): string; + private getXmlInternal(compact?); + private saveProjectInfo(template, values); + private saveGanttChartItem(item, template, values); + private savePredecessorItem(item, predecessorItem, template, values); + private saveResourceInfo(resource, template, values); + private saveAssignmentInfo(item, resource, allocationUnits, template, values); + private static applyStringTemplateValues(template, values); + private static convertDateToXml(dateTime); + private static convertDayTimeToXml(dayTime); + private static convertTimeSpanToXml(timeSpan); + public exportXml(output?: any): any; + static initializeSettings(settings: Settings): void; + } + interface Settings { + assignableResources?: string[]; + projectInfoLoadingHandler? (e: ElementLoadingEventArgs): void; + ganttChartItemLoadingHandler? (e: GanttChartItemLoadingEventArgs): void; + assignmentInfoLoadingHandler? (e: AssignmentInfoLoadingEventArgs): void; + predecessorItemLoadingHandler? (e: PredecessorItemLoadingEventArgs): void; + assignableResourceInfoLoadingHandler? (e: AssignableResourceInfoLoadingEventArgs): void; + projectInfoSavingHandler? (e: ElementSavingEventArgs): void; + ganttChartItemSavingHandler? (e: GanttChartItemSavingEventArgs): void; + predecessorItemSavingHandler? (e: PredecessorItemSavingEventArgs): void; + resourceInfoSavingHandler? (e: ResourceInfoSavingEventArgs): void; + assignmentInfoSavingHandler? (e: AssignmentInfoSavingEventArgs): void; + compact?: boolean; + spaceSeparated?: boolean; + } + interface ElementLoadingEventArgs { + sourceElement: GanttChartView.Element; + } + interface GanttChartItemLoadingEventArgs extends ElementLoadingEventArgs { + ganttChartItem: GanttChartView.Item; + } + interface AssignmentInfoLoadingEventArgs extends GanttChartItemLoadingEventArgs { + resource: string; + allocationUnits: number; + } + interface PredecessorItemLoadingEventArgs extends GanttChartItemLoadingEventArgs { + predecessorItem: GanttChartView.PredecessorItem; + } + interface AssignableResourceInfoLoadingEventArgs extends ElementLoadingEventArgs { + resource: string; + } + interface ElementSavingEventArgs { + outputXml: string; + } + interface GanttChartItemSavingEventArgs extends ElementSavingEventArgs { + ganttChartItem: GanttChartView.Item; + } + interface PredecessorItemSavingEventArgs extends GanttChartItemSavingEventArgs { + predecessorItem: GanttChartView.PredecessorItem; + } + interface ResourceInfoSavingEventArgs extends ElementSavingEventArgs { + resource: string; + } + interface AssignmentInfoSavingEventArgs extends GanttChartItemSavingEventArgs { + resource: string; + allocationUnits: number; + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.js new file mode 100644 index 000000000..217f29dcd --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.js @@ -0,0 +1,34 @@ +"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras",company:"DlhSoft",product:"Project Data Modern Library",version:"5.1.10.5",copyright:"Copyright \ufffd 2013-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls Extras",description:"Project Data Gantt Chart related HTML client extra components"}); +DlhSoft.buildReleaseDate=function(i,C,p){i=new Date(i,C-1,p);return i>DlhSoft.buildReleaseDate?i:DlhSoft.buildReleaseDate}(2014,1,15);var DlhSoft; +(function(i){(function(i){(function(p){(function(i){i.initialize=function(a,b){return new J(a,b)};var J=function(){function a(b,c){this.control=b;this.settings=c;"undefined"===typeof c&&(c={});this.settings=c;a.initializeSettings(this.settings)}a.prototype.loadXml=function(b){this.importXml(b)};a.prototype.importXml=function(b){var c=this.control,e=c.items,g=c.settings,d=null;if("undefined"!==typeof b&&("undefined"!==typeof b.document&&(b=b.document),"undefined"!==typeof b.getElementsByTagName))d= +b,1!=d.getElementsByTagName("Project").length&&(b=d.body.innerHTML,b=b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/
/g,"\n"),d=null);null==d&&(d=(new DOMParser).parseFromString(b.toString(),"text/xml"));var b=[],W=[],i=[],q=[];"undefined"!==typeof this.settings.assignableResources&&this.settings.assignableResources.splice(0,this.settings.assignableResources.length);d=d.getElementsByTagName("Project")[0];if("undefined"!==typeof d){var k,l,s,h;try{var n=d.getElementsByTagName("CalendarUID")[0].childNodes[0].nodeValue, +r,f,y=d.getElementsByTagName("Calendars")[0].getElementsByTagName("Calendar");for(f=0;fd?1:-1});var z=n[0];k=parseInt(z.getElementsByTagName("DayType")[0].childNodes[0].nodeValue)-1;l=parseInt(n[n.length-1].getElementsByTagName("DayType")[0].childNodes[0].nodeValue)-1;var m=z.getElementsByTagName("WorkingTimes")[0].getElementsByTagName("WorkingTime");s=a.parseXmlToTimeSpan(m[0].getElementsByTagName("FromTime")[0].childNodes[0].nodeValue);for(f=h=0;f=t.getElementsByTagName("Name").length)){var M=parseInt(t.getElementsByTagName("OutlineLevel")[0].childNodes[0].nodeValue)-1;if(!(0>M)){E=t.getElementsByTagName("UID")[0].childNodes[0].nodeValue;K=t.getElementsByTagName("Name")[0].childNodes[0].nodeValue;var N=a.parseXmlToDateTime(t.getElementsByTagName("Start")[0].childNodes[0].nodeValue),O=a.parseXmlToDateTime(t.getElementsByTagName("Finish")[0].childNodes[0].nodeValue),C=parseInt(t.getElementsByTagName("PercentComplete")[0].childNodes[0].nodeValue), +X=p.getOutputDate(c.getCompletedFinish(p.getInputDate(N),C/100,p.getInputDate(O))),Y="1"==t.getElementsByTagName("Milestone")[0].childNodes[0].nodeValue?!0:!1;o={content:K,indentation:M,isExpanded:!0,start:N,finish:O,completedFinish:X,isMilestone:Y};"undefined"!==typeof this.settings.ganttChartItemLoadingHandler&&(j={sourceElement:t,ganttChartItem:o},this.settings.ganttChartItemLoadingHandler(j),o=j.ganttChartItem);b.push(o);i.push({key:E,value:o})}}}var P=d.getElementsByTagName("Resources")[0].getElementsByTagName("Resource"); +for(f=0;f=G.getElementsByTagName("Name").length)){E=G.getElementsByTagName("UID")[0].childNodes[0].nodeValue;var w=K=G.getElementsByTagName("Name")[0].childNodes[0].nodeValue;"undefined"!==typeof this.settings.assignableResourceInfoLoadingHandler&&(j={sourceElement:G,resource:w},this.settings.assignableResourceInfoLoadingHandler(j),w=j.resource);W.push(w);q.push({key:E,value:w});"undefined"!==typeof this.settings.assignableResources&&this.settings.assignableResources.push(w)}}var Q= +d.getElementsByTagName("Assignments")[0].getElementsByTagName("Assignment");for(f=0;fB)){o=i[B].value;var Z=H.getElementsByTagName("ResourceUID")[0].childNodes[0].nodeValue,R=a.indexOfKey(q,Z);if(!(0>R)){var w=q[R].value,S=H.getElementsByTagName("Units")[0].childNodes[0].nodeValue,A="undefined"!==typeof S?parseFloat(S):1,L=w+(1!=A?" ":"")+(1!=A?"["+Math.round(1E4*A)/100+"%]":"");"undefined"!== +typeof this.settings.assignmentInfoLoadingHandler&&(j={sourceElement:H,ganttChartItem:o,resource:w,allocationUnits:A},this.settings.assignmentInfoLoadingHandler(j),w=j.resource,A=j.allocationUnits,L=w+(1!=A?" ":"")+(1!=A?"["+Math.round(1E4*A)/100+"%]":""));o.assignmentsContent="undefined"===typeof o.assignmentsContent||0==o.assignmentsContent.length?L:o.assignmentsContent+", "+L}}}D=d.getElementsByTagName("Tasks")[0].getElementsByTagName("Task");for(f=0;fB)){o=i[B].value;var T=t.getElementsByTagName("PredecessorLink");for(k=0;kU)){var aa=i[U].value,I=x.getElementsByTagName("Type")&&x.getElementsByTagName("Type")[0]&&x.getElementsByTagName("Type")[0].childNodes?parseInt(x.getElementsByTagName("Type")[0].childNodes[0].nodeValue):1;l=1==I?"":3==I?"SS":0==I?"FF":2==I?"SF":"";var V=x.getElementsByTagName("LinkLag")&& +x.getElementsByTagName("LinkLag")[0]&&x.getElementsByTagName("LinkLag")[0].childNodes?x.getElementsByTagName("LinkLag")[0].childNodes[0].nodeValue:null,ba=(null!=V?parseInt(V):0)/10*a.minuteDuration;l={item:aa,dependencyType:l,lag:ba};"undefined"!==typeof this.settings.predecessorItemLoadingHandler&&(j={sourceElement:x,ganttChartItem:o,predecessorItem:l},this.settings.predecessorItemLoadingHandler(j),l=j.predecessorItem,o=j.ganttChartItem);"undefined"===typeof o.predecessors&&(o.predecessors=[]); +o.predecessors.push(l)}}}for(f=0;ff&&(e=f);g.timelineStart=new Date(e.valueOf()-1*a.weekDuration);g.timelineFinish=new Date(e.valueOf()+52*a.weekDuration);g.displayedTime=e;c.refresh()};a.parseXmlToTimeSpan=function(b){var a,e,g,d,i;d=b.indexOf(":");i=b.lastIndexOf(":");0d&&b.length>i)&&(a=parseInt(b.substr(0,d)),e=parseInt(b.substr(d+1,i)),g=parseInt(b.substr(i+1,b.length)));return 1E3*(3600*a+60*e+g)};a.parseXmlToDateTime= +function(b){var a,e,g,d,i,p,q,k,l=b.indexOf("T");q=b.indexOf("-");0q&&(e=parseInt(b.substring(q+1,k)),l>k&&(g=parseInt(b.substring(k+1,l)))));q=b.indexOf(":");0k&&(p=parseInt(b.substring(k+1,b.length)))));return new Date(a,e-1,g,d,i,p)};a.indexOfKey=function(b,a){for(var e=0;ethis.settings.assignableResources.indexOf(k[d])&&this.settings.assignableResources.push(k[d]); +var k=this.settings.assignableResources,l="";for(d=0;7>d;d++){var s=g.workingWeekStart<=d&&g.workingWeekFinish>=d;0/g,">")},{key:"Indentation",value:(h.indentation+1).toString()},{key:"Start",value:a.convertDateToXml(p.getOutputDate(f))},{key:"Finish",value:a.convertDateToXml(p.getOutputDate(y))},{key:"Duration",value:a.convertTimeSpanToXml(u)},{key:"CompletedDuration",value:a.convertTimeSpanToXml(n)},{key:"Effort",value:a.convertTimeSpanToXml(r)},{key:"CompletedEffort",value:a.convertTimeSpanToXml(z)}, +{key:"RemainingEffort",value:a.convertTimeSpanToXml(r-z)},{key:"IsMilestone",value:h.isMilestone?1:0},{key:"IsSummary",value:h.hasChildren?1:0},{key:"Cost",value:c.getItemCost(h)},{key:"Completion",value:!h.isMilestone&&0q&&!h.hasChildren?""+a.convertDateToXml(p.getOutputDate(f))+"":""},{key:"PredecessorLinks",value:m}];s+=this.saveGanttChartItem(h,a.taskXmlTemplate,r)}n="";for(d=0;d< +k.length;d++)0/g,">")}],n+=this.saveResourceInfo(h,a.resourceXmlTemplate,r);f="";for(d=0;d/g,">").replace(/\n/g,"
");a.write(e);a.close();return c};a.initializeSettings=function(){};a.secondDuration=1E3;a.minuteDuration=60*a.secondDuration;a.hourDuration=60*a.minuteDuration;a.dayDuration=24*a.hourDuration;a.weekDuration=7*a.dayDuration;a.projectXmlTemplate="\n\n14\n1\n{ProjectStart}\n{DayStart}\n{DayFinish}\n{MinutesPerDay}\n{MinutesPerWeek}\n7\n2\n1\n\n\n1\nStandard\n1\n-1\n\n{ScheduleWeekDays}\n\n\n\n\n{Tasks}\n\n\n{Resources}\n\n\n{Assignments}\n\n"; +a.scheduleWeekDayXmlTemplate="\n{DayNumber}\n{IsWorkingDay}\n{WorkingTimes}\n";a.scheduleDayWorkingTimesXmlTemplate="\n\n{FromTime}\n{ToTime}\n\n";a.taskXmlTemplate="\n{Index}\n{Index}\n1\n{Content}\n0\n0\n{Indentation}\n500\n{Start}\n{Finish}\n{Duration}\n7\n{Effort}\n{CompletedDuration}\n{CompletedEffort}\n{RemainingEffort}\n{IsMilestone}\n{IsSummary}\n0\n3\n{Completion}\n{Cost}\n0\n{ConstraintDefinition}\n-1\n0\n{PredecessorLinks}\n"; +a.predecessorXmlTemplate="\n{PredecessorIndex}\n{DependencyType}\n{Lag}\n5\n";a.resourceXmlTemplate="\n{Index}\n{Index}\n{Name}\n1\n0\n1\n";a.assignmentXmlTemplate="\n{Indexes}\n{TaskIndex}\n{ResourceIndex}\n{AllocationUnits}\n{Completion}\n{Start}\n{Finish}\n{Effort}\n{CompletedEffort}\n{RemainingEffort}\n"; +return a}();i.Service=J})(p.ProjectSerializer||(p.ProjectSerializer={}))})(i.GanttChartView||(i.GanttChartView={}))})(i.Controls||(i.Controls={}))})(DlhSoft||(DlhSoft={})); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts new file mode 100644 index 000000000..e93848041 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts @@ -0,0 +1,861 @@ +/* Assembly: DlhSoft.ProjectData.GanttChart.HTML.Controls, + Company: DlhSoft, + Product: Project Data Modern Library, + Version: 5.3.17.0, + Copyright: Copyright © 2012-2020 DlhSoft, + Title: Project Data Gantt Chart HTML Controls, + Description: Project Data Gantt Chart related HTML client components */ + +/* +/// +*/ + +/// + +declare module DlhSoft.Controls { + /** Represents a control that presents task data items using a Gantt Chart and an associated tree-grid. */ + module GanttChartView { + /** + * Initializes a GanttChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Task data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): Column[]; + + function getDefaultCollapsedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + function getDefaultExpandedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + + /** Returns an array of default definitions that you can further customize and use as value for the scales property of the control settings used at initialization time. */ + function getDefaultScales(settings: Settings): Scale[]; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultStandardTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultSummaryTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultMilestoneTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultAssignmentsTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultDependencyLineTemplate(items: Item[], settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + function getDefaultPredecessorItemTemplate(settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + + /** Inside task template functions, sets up task drag and drop behavior for the non-null SVG elements specified to be designed as thumbs, considering the specified item and item positioning in the chart. */ + function initializeTaskDraggingThumbs(startThumb: SVGElement, startOnlyThumb: SVGElement, finishThumb: SVGElement, completedFinishThumb: SVGElement, item: Item, itemLeft: number, itemRight: number, itemCompletedRight: number): void; + + /** Inside task template functions, sets up dependency creation drag and drop behavior for the non-null SVG elements specified to be designed as thumbs inside its specified container group that would be used to supplementary present temporary dependency lines during drag and drop operations, considering the specified item and item positioning in the chart. */ + function initializeDependencyDraggingThumbs(thumb: SVGElement, startThumb: SVGElement, containerGroup: SVGGElement, item: Item, itemTop: number, itemRight: number, itemLeft: number): void; + + function getWorkingTime(dateTime: Date, settings: Settings, schedule?: Schedule): Date; + function getEffort(start: Date, finish: Date, settings: Settings, schedule?: Schedule): number; + function getFinish(start: Date, effort: number, settings: Settings, schedule?: Schedule): Date; + function getStart(effort: Date, finish: number, settings: Settings, schedule?: Schedule): Date; + function getCompletion(start: Date, completedFinish: Date, finish: Date, settings: Settings, schedule?: Schedule): number; + function getCompletedFinish(start: Date, completion: number, finish: Date, settings: Settings, schedule?: Schedule): number; + function getWeekStart(dateTime: Date, weekStartDay: number): Date; + function getWeekFinish(dateTime: Date, weekStartDay: number): Date; + + function defaultDateTimeFormatter(date: Date): string; + function defaultDateFormatter(date: Date): string; + function defaultDateTimeParser(value: string): Date; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function optionSelectColumnTemplateBase(document: HTMLDocument, width: number, optionCollectionGetter: () => any[], valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function numberInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function percentInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function timeSpanInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, scale?: number, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function dateTimeInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function datePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function dateTimePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function multiSelectorComboBoxInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIndexColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + function getWbsColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + function getEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getTotalEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getDurationColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getCompletedEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getTotalCompletedEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getCompletionColumnTemplate(inputWidth: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getPredecessorsColumnTemplate(inputWidth: number, isInputDisabled?: boolean, zeroBased?: boolean): (item: Item) => HTMLElement; + function getAssignmentSelectorColumnTemplate(selectWidth: number, assignableResourcesCollection: any[], isInputDisabled?: boolean, useMultiSelectorComboBox?: boolean): (item: Item) => HTMLElement; + function getAssignmentSelectorColumnTemplate(selectWidth: number, assignableResourcesCollectionGetter: (item: Item) => any[], isInputDisabled?: boolean, useMultiSelectorComboBox?: boolean): (item: Item) => HTMLElement; + function getCostColumnTemplate(inputWidth: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getBaselineStartColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getBaselineFinishColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMinStartColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMaxStartColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMinFinishColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMaxFinishColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides GanttChartView component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshGridItems(): void; refreshChartItems(): void; refreshItems(): void; refreshGridItem(item: Item): void; refreshChartItem(item: Item): void; refreshItem(item: Item): void; refreshPredecessorItems(item: Item): void; refreshItemGraph(item: Item): void; refreshItemPath(item: Item): void; refreshItemNeighbourhood(item: Item): void; + refreshCurrentTime(): void; setCurrentTime(currentTime: Date): void; updateCurrentTime(): void; + + insertItem(index: number, item: Item): void; addItem(item: Item): void; insertItems(index: number, items: Item[]): void; addItems(items: Item[]): void; + removeItem(item: Item): void; removeItems(items: Item[]): void; + moveRange(fromIndex: number, count: number, toIndex: number): void; + moveItem(item: Item, toIndex: number): void; + moveItemHierarchy(item: Item, toIndex: number): void; + moveItemUp(item: Item): void; moveItemDown(item: Item): void; + moveItemHierarchyUp(item: Item): void; moveItemHierarchyDown(item: Item): void; + + increaseItemIndentation(item: Item): void; decreaseItemIndentation(item: Item): void; + + setItemContent(item: Item, value: any): void; + setItemStart(item: Item, value: Date): void; setItemFinish(item: Item, value: Date): void; + setItemIsMilestone(item: Item, value: boolean): void; + getItemEffort(item: Item): number; setItemEffort(item: Item, value: number): void; getItemCompletedEffort(item: Item): number; setItemCompletedEffort(item: Item, value: number): void; + getItemTotalEffort(item: Item): number; getItemTotalCompletedEffort(item: Item): number; + setItemTotalEffort(item: Item, value: number): void; setItemTotalCompletedEffort(item: Item, value: number): void; + setItemHasFixedEffort(item: Item, value: boolean): void; + getItemDuration(item: Item): number; setItemDuration(item: Item, value: number): void; + getItemCompletion(item: Item): number; setItemCompletion(item: Item, value: number): void; + isItemCompleted(item: Item): boolean; setItemAsCompleted(item: Item): void; + hasItemStarted(item: Item): boolean; setItemAsNotStarted(item: Item): void; isItemOnSchedule(item: Item): boolean; + setItemAssignmentsContent(item: Item, value: any): void; + getItemIndexString(item: Item, zeroBased?: boolean): string; + getItemPredecessorsString(item: Item, zeroBased?: boolean): string; setItemPredecessorsString(item: Item, value: string, zeroBased?: boolean): void; + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + expandItem(item: Item): void; collapseItem(item: Item): void; + scrollToItem(item: Item): void; scrollToBottom(): void; scrollToDateTime(dateTime: Date): void; + increaseTimelinePage(timeAmount: number): void; decreaseTimelinePage(timeAmount: number): void; + setHourWidth(hourWidth: number): void; + setSplitterPosition(gridWidth: number, chartWidth: number); + + /** Returns the X coordinate of a specific date and time in the chart area. */ + getChartPosition(dateTime: Date): number; + /** Returns the actual width of the chart area. */ + getChartWidth(): number; + + /** Returns the date and time of a specific X coordinate in the chart area. */ + getDateTime(chartPosition: number): Date; + + /** Returns the next available working time in the schedule based on the specified date and time. */ + getWorkingTime(dateTime: Date): Date; + + getStartWorkingTime(dateTime: Date): Date; getFinishWorkingTime(dateTime: Date): Date; + + /** Returns the actual working effort (in milliseconds) required to complete a task that starts and finishes on the specified date and times. */ + getEffort(start: Date, finish: Date): number; + + /** Returns the actual finish date and time of a task that starts on the specified date and time and completes after the specified working effort (in milliseconds). */ + getFinish(start: Date, effort: number): Date; + + /** Returns the actual start date and time of a task that has completed after the specified working effort (in milliseconds) and finishes on the specified date and time. */ + getStart(effort: number, finish: Date): Date; + + /** Returns the completion rate (between 0 and 1) of a task that is scheduled between the specified start and finish date and times and has been completed up to the specified completed finish date and time. */ + getCompletion(start: Date, completedFinish: Date, finish: Date): number; + + /** Returns the completed finish date and time of a task that is scheduled between the specified start and finish date and times and has the specified completion rate (between 0 and 1). */ + getCompletedFinish(start: Date, completion: number, finish: Date): Date; + + getItemsHeight(): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + getRootItems(): Item[]; getLeafItems(): Item[]; getSummaryItems(): Item[]; + getProjectStart(): Date; getProjectFinish(): Date; + getProjectEffort(): number; getProjectCompletedEffort(): number; + getProjectTotalEffort(): number; getProjectTotalCompletedEffort(): number; + getProjectCompletion(): number; + + isItemCritical(item: Item): boolean; getCriticalItems(criticalDelay?: number): Item[]; + getPertCriticalItems(maxIndentation?: number): Item[]; + + ensureDependencyConstraints(): void; + + /** Sets up baseline start and baseline finish properties of standard and milestone task items based on their actual start and finish values; used as preparation for rescheduling the remaining work effort of a task item. */ + setupBaseline(): void; + + rescheduleItemToStart(item: Item, start: Date): void; + rescheduleItemToFinish(item: Item, finish: Date): void; + + /** Creates and inserts a partial copy of the specified task item considering its remaining work effort into the managed hierarchy, and updates the finish date and time of the original task item to its completion point. */ + splitRemainingWork(item: Item): void; + + /** Optimizes schedule times of all managed items in order to optimize the project finish date without leveling resources (optionally using single pass task leveling), respecting dependency constraints. */ + optimizeWork(dependenciesOnly?: boolean, includeStartedTasks?: boolean, start?: Date, singlePassTaskLeveling?: boolean): void; + + /** Levels the assigned allocation units assuming that all or the specified tasks within the control are fixed duration and effort driven; requires that assignmentsContent property of the task items is of type string, formatted as a list of resource names separated by commas, optionally having associated allocation percents declared between square brackets (e.g.: "John, Mary [50%], Diane [12.5%]"). */ + levelAllocations(items?: Item[]): void; + + /** Levels the assigned resources from all standard tasks within the control in order to avoid over allocation, by updating task timing values accordingly; requires that assignmentsContent property of the task items is of type string, formatted as a list of resource names separated by commas, optionally having associated allocation percents declared between square brackets (e.g.: "John, Mary [50%], Diane [12.5%]"); includeStartedTasks parameter indicates whether or not to consider already started tasks (i.e. having completion > 0), and start parameter specifies the date and time to consider for resource leveling algorithm. */ + levelResources(includeStartedTasks?: boolean, start?: Date): void; + + getItemSuccessors(item: Item): Item[]; + getItemSuccessorPredecessorItems(item: Item): PredecessorItem[]; + getItemAllocationUnits(item: Item): number; + getItemAssignments(item: Item): { key: any; value: number; }[]; + + /** Determines the list of the assignments of a specific task item, as strings indicating the assigned resource names. */ + getItemAssignedResources(item: Item): any[]; + + getResourceAssignments(resourceName: any): { key: Item; value: number; }[]; + + /** Determines the list of the assignments of a specific resource, as objects indicating the assigned task items. */ + getResourceAssignedItems(resourceName: any): Item[]; + + /** Determines the list of all assigned resources within the current project, as strings indicating their names. */ + getAssignedResources(): any[]; + + /** Returns a list of Schedule Chart items for the current project, optionally considering the minimum set of assignable resources specified as parameter; the Schedule Chart items may be displayed using a separate ScheduleChartView component instance. */ + getScheduleChartItems(assignableResources?: any[]): ScheduleChartView.Item[]; + + getItemAssignmentsCost(item: Item): number; getItemExtraCost(item: Item): number; + getItemCost(item: Item): number; setItemCost(item: Item, value: number): void; + getResourceCost(resourceName: string): number; + getProjectCost(): number; + + getAllocations(resourceName: any): { key: { start: Date; finish: Date }; value: number }[]; + + /** Returns a list of Load Chart items for the current project, optionally considering the set of resources specified as parameter; the Schedule Chart items may be displayed using a separate LoadChartView component instance. */ + getLoadChartItems(resources?: any[]): LoadChartView.Item[]; + + /** Returns a list of Load Chart items for the current project, considering the resource specified as parameter; the Schedule Chart items may be displayed using a separate LoadChartView component instance. */ + getLoadChartItems(resource: any): LoadChartView.Item[]; + + /** Returns a list of filtered read only Gantt Chart items for the current project, considering the set of resources specified as parameter; the read only Gantt Chart items may be displayed using a separate GanttChartView component instance. */ + getFilteredGanttChartItems(resources: any[]): Item[]; + + /** Returns a list of filtered read only Gantt Chart items for the current project, considering the resource specified as parameter; the read only Gantt Chart items may be displayed using a separate GanttChartView component instance. */ + getFilteredGanttChartItems(resource: any): Item[]; + + /** Returns a list of PERT Chart items for the current project, optionally considering the maximum indentation, and start, finish, and link content and suffixes values specified as parameters; the PERT Chart items may be displayed using a separate PertChartView component instance. */ + getPertChartItems(maxIndentation?: number, startContent?: string, finishContent?: string, linkContent?: string, completedContentSuffix?: string, startingContentSuffix?: string): Pert.PertChartView.Item[]; + + /** Returns a list of Network Diagram items for the current project, optionally considering the maximum indentation, and start and finish content values specified as parameters; the Network Diagram items may be displayed using a separate NetworkDiagramView component instance. */ + getNetworkDiagramItems(maxIndentation?: number, startContent?: string, finishContent?: string): Pert.NetworkDiagramView.Item[]; + + isInitializing: boolean; isInitialized: boolean; + + /** Copies the common settings of the current component instance to the specified target settings collection; a secondary component instance may be initialized using the output collection. */ + copyCommonSettings(targetSettings: Settings): void; + + /** Determines whether an item depends of another item by checking the hierarchy and predecessor items. */ + itemDependsOf(item: Item, otherItem: Item): boolean; + } + + /** Represents a task data item and its Gantt Chart representation. */ + interface Item { + /** The object that is displayed to represent the task item in the grid and in task bar tool tips, usually the task name. */ + content: any; + + /** The hierarchy is based on the indentation level values of the tasks, so that a task with a lower index in the collection and having a specific indentation level will become the parent task for the tasks with a higher index in the collection and having an increased indentation level. */ + indentation?: number; + + /** If a parent task is expanded its child tasks become visible. If a parent task is collapsed its child tasks become invisible. */ + isExpanded?: boolean; + + start: Date; finish?: Date; completedFinish?: Date; + + /** A milestone task is displayed in the Gantt Chart view using a different task bar template. */ + isMilestone?: boolean; + + /** Optionally defines specific working week and day intervals and special nonworking days to consider for scheduling purposes. */ + schedule?: Schedule; + + baselineStart?: Date; baselineFinish?: Date; + minStart?: Date; maxStart?: Date; minFinish?: Date; maxFinish?: Date; + isRelativeToTimezone?: boolean; + + /** The assignments content to be displayed in the Gantt Chart view next to the associated task bar, but it is not used internally for computing/updating task finish date and time (generating duration) based on any updated assignments. */ + assignmentsContent?: any; + + isReadOnly?: boolean; + isHidden?: boolean; + isBarVisible?: boolean; + isBarReadOnly?: boolean; + isSummaryEnabled?: boolean; + isParentSummarizationEnabled?: boolean; + + /** When set to true it would ensure that the original item's total effort is preserved when duration is updated by updating assignment allocation units, assuming that the item has resources assigned. */ + hasFixedEffort?: boolean; + + /** When specifically set to false, overrides GanttChartView.areTaskDependencyConstraintsEnabled = true (auto-scheduling) for an item, setting up manual scheduling. */ + areDependencyConstraintsEnabled?: boolean; + + displayRowIndex?: number; + + /** Optional array of parts to be represented for this group item in the chart area. */ + parts?: Item[]; + + "class"?: string; style?: string; + barClass?: string; standardBarClass?: string; completedBarClass?: string; summaryBarClass?: string; summaryCompletedBarClass?: string; milestoneBarClass?: string; baselineBarClass?: string; barStyle?: string; standardBarStyle?: string; completedBarStyle?: string; summaryBarStyle?: string; summaryCompletedBarStyle?: string; milestoneBarStyle?: string; baselineBarStyle?: string; + taskTemplate? (item: Item): SVGElement; + template? (item: Item): SVGElement; + + isSelected?: boolean; + + /** The predecessors collection defines predecessor items referring the task items that the current item depends of, and having the relations displayed in the Gantt Chart view as dependency lines, but it is not used internally for computing/updating task start and finish date and times (generating work time intervals) based on its defined dependencies. */ + predecessors?: PredecessorItem[]; + + executionCost?: number; + + /** The index of the item in the managed hierarchy. */ + index?: number; + + /** The summary item that includes this task considering indentation values, or null when there is no such parent summary item. */ + parent?: Item; + + /** Indicates whether the task is a summary item. */ + hasChildren?: boolean; + + /** When this task is a summary item (i.e. hasChildren is set to true), returns an array of its child items. */ + children?: Item[]; + + /** Indicates whether the task is visible within the hierarchy, i.e. it is not a descendent of a collapsed summary item. */ + isVisible?: boolean; + + /** Indicates whether the task is visible in the scrolling viewport of the control when virtualization is enabled. */ + isVirtuallyVisible?: boolean; + } + + /** Represents a depdendency between two task data items and its Gantt Chart representation. */ + interface PredecessorItem { + /** Task item that precedes the owner of the predecessor item (the item that the current item depends of). */ + item: Item; + + /** Indicates the type of the dependency; supported values are: FinishStart (default value), StartStart, FinishFinish, or StartFinish. */ + dependencyType?: string; + + /** Indicates an optional lag of the dependency (in milliseconds). */ + lag?: number; + + dependencyLineClass?: string; dependencyLineStyle?: string; + template? (item: Item, predecessorItem: PredecessorItem): SVGElement; + } + + /** Represents an object that defines working week and day intervals and special nonworking days either for an entire Gantt Chart or specific tasks. */ + interface Schedule { + /** The start day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Monday (1); previous days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekStart?: number; + /** The finish day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Friday (5); next days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekFinish?: number; + + /** The start time of the working day interval, in milliseconds passed since midnight; by default it is set to 8 AM; the start of the visible time interval of the day is also defined using the same value. */ + workingDayStart?: number; + /** The finish time of the working day interval, in milliseconds passed since midnight; by default it is set to 4 PM; the finish of the visible time interval of the day is also defined using the same value. */ + workingDayFinish?: number; + + /** Optional collection of special nonworking days, such as holidays. */ + specialNonworkingDays?: Date[]; + } + + /** Represents settings for a GanttChartView component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the interaction mode to generically apply to the control; Standard, and TouchEnabled interaction modes are supported; by default it is Standard. */ + interaction?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + isGridVisible?: boolean; gridWidth?: string; chartWidth?: string; + isSplitterEnabled?: boolean; splitterWidth?: number; splitterBackground?: string; + minGridWidth?: number; minChartWidth?: number; + + isReadOnly?: boolean; isGridReadOnly?: boolean; isChartReadOnly?: boolean; isContentReadOnly?: boolean; isAssignmentsContentReadOnly?: boolean; isTaskStartReadOnly?: boolean; isTaskEffortReadOnly?: boolean; isTaskCompletionReadOnly?: boolean; areTaskPredecessorsReadOnly?: boolean; + + /** Indicates whether effort is preserved for tasks when end users change their start value from the default Start column in the grid; by default it is set to false. */ + isTaskEffortPreservedWhenStartChangesInGrid?: boolean; + + headerBackground?: string; headerHeight?: number; + itemHeight?: number; + + /** Collection of objects indicating the columns to be presented in the grid. */ + columns?: Column[]; + + itemClass?: string; itemStyle?: string; + standardItemClass?: string; summaryItemClass?: string; milestoneItemClass?: string; standardItemStyle?: string; summaryItemStyle?: string; milestoneItemStyle?: string; + + selectedItemClass?: string; selectedItemStyle?: string; + + /** Indicates the selection behavior; support values are None (not allowed), Focus (single item selected triggered by focus), Single (single item selection using check box), Extended (multiple item selection using check boxes), and ExtendedFocus (multiple item selection using check boxes or triggered by focus); by default it is set to Focus. */ + selectionMode?: string; + + indentationLevelWidth?: number; + + cellClass?: string; cellStyle?: string; + toggleButtonClass?: string; toggleButtonHoveringClass?: string; toggleButtonStyle?: string; toggleButtonHoveringStyle?: string; + collapsedToggleButtonTemplate? (): HTMLElement; expandedToggleButtonTemplate? (): HTMLElement; + + /** Date and time to scroll to within the chart view. */ + displayedTime?: Date; + + /** Date and time to highlight (using a vertical bar) within the chart view. */ + currentTime?: Date; + + /** Start date and time of the scrollable chart area. */ + timelineStart?: Date; + + /** Start date and time of the scrollable chart area. */ + timelineFinish?: Date; + + isRelativeToTimezone?: boolean; + + /** Collection of objects indicating the scales to be presented in the chart. */ + scales?: Scale[]; + + /** Time interval length (in milliseconds) to be used to dynamically round date and time during drag and drop update operations; by default it is set to quarter-hour (15 minutes). */ + updateScale?: number; + + /** Indicates the zoom level to be used for the chart area, and represents the actual number of pixels each hour in the timeline gets available; to zoom in, increase this value; to zoom out, decrease it; by default it is set to 2.5. */ + hourWidth?: number; + + /** The start day of the visible week interval; by default it is set to Sunday (0). */ + visibleWeekStart?: number; + /** The finish day of the visible week interval; by default it is set to Saturday (6). */ + visibleWeekFinish?: number; + + /** The start day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Monday (1); previous days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekStart?: number; + /** The finish day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Friday (5); next days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekFinish?: number; + + /** The start time of the visible day interval, in milliseconds passed since midnight; by default it is set to 8 AM; the start of the working time interval of the day is also defined using the same value. */ + visibleDayStart?: number; + /** The finish time of the visible day interval, in milliseconds passed since midnight; by default it is set to 4 PM; the finish of the working time interval of the day is also defined using the same value. */ + visibleDayFinish?: number; + + /** Optional collection of special nonworking days, such as holidays. */ + specialNonworkingDays?: Date[]; + + /** Allows initializing working week and day intervals and special nonworking days to consider for scheduling purposes using an alternative definition object. */ + schedule?: Schedule; + + barMargin?: number; barHeight?: number; barCornerRadius?: number; + completedBarMargin?: number; completedBarHeight?: number; completedBarCornerRadius?: number; + + styleDefinitionTemplate? (ganttChartView?: Element): SVGDefsElement; + standardBarClass?: string; summaryBarClass?: string; milestoneBarClass?: string; standardBarStyle?: string; summaryBarStyle?: string; milestoneBarStyle?: string; + standardCompletedBarClass?: string; standardCompletedBarStyle?: string; + summaryCompletedBarClass?: string; summaryCompletedBarStyle?: string; + collapsedSummaryLineClass?: string; collapsedSummaryLineStyle?: string; + dependencyPointerClass?: string; dependencyPointerStyle?: string; + dependencyLineClass?: string; dependencyLineStyle?: string; + temporaryDependencyLineClass?: string; temporaryDependencyLineStyle?: string; + assignmentsClass?: string; assignmentsStyle?: string; + standardTaskTemplate? (item: Item): SVGElement; summaryTaskTemplate? (item: Item): SVGElement; milestoneTaskTemplate? (item: Item): SVGElement; + extraTaskTemplate? (item: Item): SVGElement; + + isTaskToolTipVisible?: boolean; + itemTemplate? (item: Item): SVGElement; + + areTaskAssignmentsVisible?: boolean; + assignmentsTemplate? (item: Item): SVGElement; + + isTaskCompletedEffortVisible?: boolean; + isSummaryTaskCompletedEffortVisible?: boolean; + + isIndividualItemNonworkingTimeHighlighted?: boolean; areTaskInterruptionsHighlighted?: boolean; + + areTaskDependenciesVisible?: boolean; + allowCreatingStartDependencies?: boolean; allowCreatingToFinishDependencies?: boolean; + dependencyLineTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + isDependencyToolTipVisible?: boolean; + predecessorItemTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + areToolTipsSimplified?: boolean; + + isDraggingTaskStartEndsEnabled?: boolean; + + visibilityFilter? (item: Item): boolean; + + /** Determines whether dependency constraints are enabled in the chart, providing auto-scheduling features for dependent tasks; by default is it set to false for optimization purposes. */ + areTaskDependencyConstraintsEnabled?: boolean; + + /** Determines whether dependency constraints are automatically ensured even while dragging task bars in the control (or only when the operation completes), when areTaskDependencyConstraintsEnabled property is set to true; by default it is set to false. */ + areTaskDependencyConstraintsEnabledWhileDragging?: boolean; + + /** Determines whether dependency constraints are disabled when the predecessor item is created using drag and drop operations in the chart, when areTaskDependencyConstraintsEnabled is set to false; by default it is set to false. */ + areTaskDependencyConstraintsDisabledWhenDropping?: boolean; + + areDependencyConstraintsAppliedOnStartedTasks?: boolean; + areDependencyConstraintsAppliedOnMilestones?: boolean; + + isBaselineVisible?: boolean; + + allowUserToResizeColumns?: boolean; + minColumnWidth?: number; + maxColumnWidth?: number; + + isGridRowClickTimeScrollingEnabled?: boolean; + + isMouseWheelZoomEnabled?: boolean; + isMouseWheelZoomEnabledMinHourWidth?: number; + isMouseWheelZoomEnabledMaxHourWidth?: number; + + /** The collection of resource names available for task assignments */ + assignableResources?: string[]; + autoAppendAssignableResources?: boolean; + + /** Quantity values to consider when leveling resources, indicating maximum amounts of materials available for use at the same time. */ + resourceQuantities?: { key: string; value: number }[]; + maxLoadChartDisplayedResourceQuantity?: number; + + /** Resource schedules */ + resourceSchedules?: { key: string; value: Schedule }[]; + + taskInitiationCost?: number; + defaultResourceUsageCost?: number; + specificResourceUsageCosts?: { key: string; value: number }[]; + defaultResourceHourCost?: number; + specificResourceHourCosts?: { key: string; value: number }[]; + + alternativeItemClass?: string; alternativeChartItemClass?: string; alternativeItemStyle?: string; alternativeChartItemStyle?: string; + + gridLines?: string; horizontalGridLines?: string; verticalGridLines?: string; horizontalChartLines?: string; + + /** Indicates whether the control will create task bars only when they need to be presented (such as only when scrolling the view to their positions); by default it is set to true for optimization purposes. */ + isVirtualizing?: boolean; + + /** The input type to use for the default start and finish cell value editors in the grid; "text" by default. */ + dateTimePickerType?: string; + + /** Indicates whether to use date picker controls for start and finish date cells in the grid when date time picker type is set to "text" and the required data control library is available. */ + useDatePicker?: boolean; + + /** Indicates the number of calendar selector levels that may be displayed on date picker controls; supported values: 1: months, 2: + years, 3: + decades. */ + calendarSelectorLevels?: number; + + /** Indicates whether to use time picker besides date picker controls (when useDatePicker is set to true) for start and finish date cells when the required data control library is available. */ + useTimePicker?: boolean; + + /** Indicates whether to use multi-selector combo box controls for assignment cells in the grid when the required data control library is available. */ + useResourceSelector?: boolean; + + /** Indicates whether to use tool tip controls for updating task start, finish, completion, dependencies, and/or assignments in the chart using drag and drop operations when the required data control library is available. */ + useUpdatingToolTips?: boolean; + + /** Names of the months to use at presentation time. */ + months?: string[]; + /** Names of the days of the week to use at presentation time. */ + daysOfWeek?: string[]; + + /** Day of the week to consider as week start; by default it is set to Sunday (0); to set it to Monday use one (1). */ + weekStartDay?: number; + + /** Converts date values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateFormatter? (date: Date): string; + /** Converts date and time values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateTimeFormatter? (dateTime: Date): string; + /** Converts text values to date and time values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateTimeParser? (text: string): Date; + + /** Function called whenever the end user scrolls the chart area horizontally, changing the left most displayed time (settings.displayedTime). */ + displayedTimeChangeHandler? (displayedTime: Date): void; + /** Function called whenever the end user performs mouse wheel zooming on the chart area, changing the zoom level (settings.hourWidth). */ + hourWidthChangeHandler? (hourWidth: number): void; + /** Function called whenever the end user resizes the grid and chart areas horizontally, changing the splitter position (settings.gridWidth and settings.chartWidth). */ + splitterPositionChangeHandler? (gridWidth: number, chartWidth: number): void; + /** Function called whenever the end user resizes a grid column, changing its width (column.width). */ + columnWidthChangeHandler? (column: Column, width: number): void; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control, when using the default grid columns and task template functions. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + /** Function called whenever summary item expansion state changes within the control, providing the expanded or collapsed item, and a Boolean value indicating the updated expansion state, specified as parameters. */ + itemExpansionChangeHandler? (item: Item, isExpanded: boolean): void; + /** Function called whenever item selection changes within the control, providing the selected or unselected item, a Boolean value indicating the updated selection state, and a Boolean value indicating whether this change was directly triggered by the user, specified as parameters. */ + itemSelectionChangeHandler? (item: Item, isSelected: boolean, isDirect: boolean): void; + + /** Function called whenever an item is moved in the managed list of the control, providing the item, source and target positions of the item, specified as parameters. */ + itemMoveHandler? (item: Item, fromIndex: number, toIndex: number): void; + + itemContextMenuHandler? (e: Event, item: Item): void; + predecessorItemContextMenuHandler? (e: Event, predecessorItem: PredecessorItem, targetItem: Item): void; + + mouseHandler? (eventName: string, isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date, button: number, clickCount: number, e: MouseEvent): void; + mouseMoveHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date): void; + mouseDownHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date, button: number): void; + clickHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date): void; + doubleClickHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date): void; + itemClickHandler? (isOnChart: boolean, item: Item, column: Column|Date): void; + itemDoubleClickHandler? (isOnChart: boolean, item: Item, column: Column|Date): void; + chartClickHandler? (isOnItemsArea: boolean, row: Item|Scale, dateTime: Date): void; + chartDoubleClickHandler? (isOnItemsArea: boolean, row: Item|Scale, dateTime: Date): void; + chartItemClickHandler? (item: Item, dateTime: Date): void; + chartItemDoubleClickHandler? (item: Item, dateTime: Date): void; + dependencyLineClickHandler? (predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + dependencyLineDoubleClickHandler?(predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + + invalidPredecessorDetectionHandler?(predecessorItem: PredecessorItem, targetitem: Item, sourceItem: Item): void; + } + + /** Represents a grid column displayed by the GanttChartView component. */ + interface Column { + isTreeView?: boolean; + + header: any; + width: number; minWidth?: number; maxWidth?: number; + + isReadOnly?: boolean; allowUserToResize?: boolean; + isSelection?: boolean; + + headerClass?: string; headerStyle?: string; + cellClass?: string; cellStyle?: string; + + /** Function that returns the output (document node) to be presented within the grid cell of this column in the standard view, for a specific item received as parameter. */ + cellTemplate(item: Item): HTMLElement; + + exportCellTemplate? (item: Item): HTMLElement; + } + + /** Represents a chart scale displayed by the GanttChartView component. */ + interface Scale { + /** Type of the scale; supported values are: Years, Months, Weeks, Days, Hours, NonworkingTime (highlighting weekends), CurrentTime (current time vertical bar), FutureTime (current time vertical bar with future highlighting support), and Custom (the developer needs to also set the intervals collection in this case, using time interval objects defined by start and finish properties). */ + scaleType: string; + + isHeaderVisible?: boolean; headerHeight?: number; + + /** Format to use for scale header texts; supported values are: DateTime, Date, Hour, DayOfWeek, DayOfWeekAbbreviation, Day, Month, MonthAbbreviation, Year, MonthYear, Localized, and Custom (the developer needs to also set the headerText property of each interval object within the intervals collection of the scale object in this case), or a function that converts a Date parameter to a presentation string. */ + headerTextFormat?: any; + + headerClass?: string; headerStyle?: string; + + isHighlightingVisible?: boolean; + highlightingClass?: string; highlightingStyle?: string; + + isSeparatorVisible?: boolean; + separatorClass?: string; separatorStyle?: string; + + intervals?: ScaleInterval[]; + } + + /** Represents an interval for a custom scale displayed by the GanttChartView component. */ + interface ScaleInterval { + start: Date; finish: Date; + headerText?: string; + } + + /** Represents export settings for a GanttChartView component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + isGridVisible?: boolean; + columnIndexes?: number[]; + timelineStart?: Date; timelineFinish?: Date; + hourWidth?: number; + startRowIndex?: number; endRowIndex?: number; + rotate?: boolean; + autoClose?: boolean; + } + } + + /** Represents a control that presents resource and assigned task data items using a Schedule Chart and an associated grid. */ + module ScheduleChartView { + /** + * Initializes a ScheduleChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items resource data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): GanttChartView.Column[]; + + /** Returns an array of default definitions that you can further customize and use as value for the scales property of the control settings used at initialization time. */ + function getDefaultScales(settings: Settings): GanttChartView.Scale[]; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultStandardTaskTemplate(items: GanttChartView.Item[], controlElement: Element, settings: Settings): (item: GanttChartView.Item) => SVGElement; + function getDefaultMilestoneTaskTemplate(items: GanttChartView.Item[], controlElement: Element, settings: Settings): (item: GanttChartView.Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: GanttChartView.Item) => SVGElement; + function getDefaultAssignmentsTemplate(settings: Settings): (item: GanttChartView.Item) => SVGElement; + + /** Inside task template functions, sets up task drag and drop behavior for the non-null SVG elements specified to be designed as thumbs, considering the specified item and item positioning in the chart. */ + function initializeTaskDraggingThumbs(startThumb: SVGElement, startOnlyThumb: SVGElement, finishThumb: SVGElement, completedFinishThumb: SVGElement, item: GanttChartView.Item, itemLeft: number, itemRight: number, itemCompletedRight: number): void; + + /** Inside task template functions, sets up assignment update drag and drop behavior for the non-null SVG element specified to be designed as a thumb inside its specified container group that would be used to supplementary present temporary assignment target rectangles during drag and drop operations, considering the specified item and item positioning in the chart. */ + function initializeAssignmentDraggingThumb(thumb: SVGElement, containerGroup: SVGGElement, item: GanttChartView.Item, itemTop: number, itemRight: number): void; + + function getWorkingTime(dateTime: Date, settings: Settings): Date; + function getEffort(start: Date, finish: Date, settings: Settings): number; + function getFinish(start: Date, effort: number, settings: Settings): Date; + function getStart(effort: Date, finish: number, settings: Settings): Date; + function getCompletion(start: Date, completedFinish: Date, finish: Date, settings: Settings): number; + function getCompletedFinish(start: Date, completion: number, finish: Date, settings: Settings): number; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides ScheduleChartView component services. */ + interface Element extends GanttChartView.Element { + scheduleChartItems: Item[]; + settings: Settings; + + refreshScheduleChartItem(item: Item): void; + + insertScheduleChartItem(index: number, item: Item): void; addScheduleChartItem(item: Item): void; insertScheduleChartItems(index: number, items: Item[]): void; addScheduleChartItems(items: Item[]): void; + removeScheduleChartItem(item: Item): void; removeScheduleChartItems(items: Item[]): void; + moveScheduleChartRange(fromIndex: number, count: number, toIndex: number): void; + moveScheduleChartItem(item: Item, toIndex: number); + moveScheduleChartItemUp(item: Item): void; moveScheduleChartItemDown(item: Item): void; + + setItemContent(item: Item, value: any): void; + + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + + scrollToItem(item: Item): void; + + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + isScheduleChartInitializing: boolean; isScheduleChartInitialized: boolean; + } + + /** Represents a resource data item and its Schedule Chart representation. */ + interface Item extends GanttChartView.Item { + /** The object that is displayed to represent the resource item in the grid, usually the resource name. */ + content: any; + + /** Task data items assigned to the current resource. */ + ganttChartItems: GanttChartView.Item[]; + + /** The index of the item in the Schedule Chart item collection. */ + scheduleChartIndex?: number; + } + + /** Represents settings for a ScheduleChartView component. */ + interface Settings extends GanttChartView.Settings { + areAssignmentsReadOnly?: boolean; + + assignmentThumbClass?: string; assignmentThumbStyle?: string; + temporaryAssignmentThumbClass?: string; temporaryAssignmentThumbStyle?: string; + + assignmentThumbTemplate? (item: GanttChartView.Item): SVGElement; + temporaryAssignmentThumbTemplate? (document: HTMLDocument, x: number, y: number, width: number, height: number): SVGElement; + } + } + + /** Represents a control that presents resource and allocation data items using a Load Chart and an associated grid. */ + module LoadChartView { + /** + * Initializes a LoadChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items resource data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): GanttChartView.Column[]; + + /** Returns an array of default definitions that you can further customize and use as value for the scales property of the control settings used at initialization time. */ + function getDefaultScales(settings: Settings): GanttChartView.Scale[]; + + function getDefaultAllocationTemplate(items: GanttChartView.Item[], controlElement: Element, settings: Settings): (item: AllocationItem) => SVGElement; + + function getWorkingTime(dateTime: Date, settings: Settings): Date; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides LoadChartView component services. */ + interface Element extends ScheduleChartView.Element { + loadChartItems: Item[]; + settings: Settings; + + refreshLoadChartItem(item: Item): void; + + insertLoadChartItem(index: number, item: Item): void; addLoadChartItem(item: Item): void; insertLoadChartItems(index: number, items: Item[]): void; addLoadChartItems(items: Item[]): void; + removeLoadChartItem(item: Item): void; removeLoadChartItems(items: Item[]): void; + moveLoadChartRange(fromIndex: number, count: number, toIndex: number): void; + moveLoadChartItem(item: Item, toIndex: number); + moveLoadChartItemUp(item: Item): void; moveLoadChartItemDown(item: Item): void; + + setItemContent(item: Item, value: any): void; + + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + + scrollToItem(item: Item): void; + + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + isLoadChartInitializing: boolean; isLoadChartInitialized: boolean; + } + + /** Represents a resource data item and its Load Chart representation. */ + interface Item extends ScheduleChartView.Item { + /** Allocation data items assigned to the current resource. */ + ganttChartItems: AllocationItem[]; + + /** The index of the item in the Load Chart item collection. */ + loadChartIndex?: number; + } + + interface AllocationItem extends GanttChartView.Item { + finish: Date; + + /** Indicates the capacity used from the assigned resource item during the time interval represented by the current allocation item. */ + units: number; + } + + /** Represents settings for a LoadChartView component. */ + interface Settings extends ScheduleChartView.Settings { + /** The maximum allocation units that are to be displayed as a full height bar in in the chart. */ + maxDisplayedUnits?: number; + + normalAllocationBarClass?: string; underAllocationBarClass?: string; overAllocationBarClass?: string; normalAllocationBarStyle?: string; underAllocationBarStyle?: string; overAllocationBarStyle?: string; + allocationTemplate? (item: AllocationItem): SVGElement; + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js new file mode 100644 index 000000000..6c5395a1c --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -0,0 +1,531 @@ +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.17.0",copyright:"Copyright \u00a9 2012-2020 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +DlhSoft.buildReleaseDate=function(c,N,P){c=new Date(c,N-1,P);return c>DlhSoft.buildReleaseDate?c:DlhSoft.buildReleaseDate}(2020,11,25);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var c=_0x5c25[1],N=_0x5c25[2],P=[],aa=[],ha=_0x5c25[3],ia=function(T,K){if(typeof T!==N||typeof K!==N)return!1;if(K==ha)return!0;var ba=K[_0x5c25[11]](_0x5c25[10]);if(0<=ba){var M=K[_0x5c25[12]](0,ba),I,L=M[_0x5c25[11]](_0x5c25[10]);if(0<=L)try{I=new Date(parseInt(M[_0x5c25[12]](L+1)))}catch(Q){}typeof I===c&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;M=M+_0x5c25[10]+T;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);M=I.toString(16)[_0x5c25[16]]();ba=K[_0x5c25[12]](ba+1);if(M==ba)return!0}return!1},W=function(T,K,N,M,I){var L=_0x5c25[17],Q=_0x5c25[18],V=typeof ComponentSource===c||!ComponentSource?Q+_0x5c25[19]+M+_0x5c25[20]+I:_0x5c25[21],P=M+_0x5c25[22]+I+_0x5c25[23],W=_0x5c25[24],x=_0x5c25[25],o=_0x5c25[26];setTimeout(function(){var c=T[_0x5c25[27]],s=c[_0x5c25[29]](_0x5c25[28]);s[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var q=c[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);q[_0x5c25[35]](v);v[_0x5c25[35]](c[_0x5c25[36]](L));q[_0x5c25[35]](c[_0x5c25[36]](W+_0x5c25[10]));v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);v[_0x5c25[35]](c[_0x5c25[36]](K));q[_0x5c25[35]](v);q[_0x5c25[35]](c[_0x5c25[36]](x+_0x5c25[10]));v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);v[_0x5c25[35]](c[_0x5c25[36]](P));q[_0x5c25[35]](v);q[_0x5c25[35]](c[_0x5c25[36]](o+ +_0x5c25[10]));v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var C=c[_0x5c25[29]](_0x5c25[39]);C[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);C[_0x5c25[32]](_0x5c25[41],V);C[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);C[_0x5c25[35]](c[_0x5c25[36]](_0x5c25[44]));v[_0x5c25[35]](C);C=c[_0x5c25[29]](_0x5c25[39]);C[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);C[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);C[_0x5c25[35]](c[_0x5c25[36]](_0x5c25[47]));C[_0x5c25[50]](_0x5c25[48],function(){T[_0x5c25[49]](s);aa[_0x5c25[7]](N)}, +!1);v[_0x5c25[35]](C);q[_0x5c25[35]](v);s[_0x5c25[35]](q);T[_0x5c25[35]](s)},0);setTimeout(function(){alert(L+_0x5c25[51]+W+_0x5c25[52]+K+_0x5c25[51]+x+_0x5c25[53]+P+_0x5c25[51]+o+_0x5c25[4])},6E5)};return{setLicense:function(c,K){P[_0x5c25[7]]({type:c,content:K})},validate:function(T,K,ba,M,I,L,Q){for(var K=K+_0x5c25[4]+ba,V=0;V0?a.insertBefore(b,a.childNodes[0]):a.appendChild(b)}catch(d){}},0)};C.addEventListener("mousedown",w,true);u.addEventListener("mouseup",w,true);a.resetChartAreaDefinitions=w;r.appendChild(C);r.chartArea=C;if(typeof e.extraSpaceHeight!==c){w=u.createElement("div");w.setAttribute("style","overflow: hidden; width: "+q+"px; height: "+e.extraSpaceHeight+"px");F.appendChild(w);F.chartExtraSpace=w}var x,z,y;setTimeout(function(){x=a.offsetWidth;z=a.offsetHeight;y=J.offsetHeight},0); +typeof a.splitterUpdateTimer!==c&&clearInterval(a.splitterUpdateTimer);a.splitterUpdateTimer=setInterval(function(){try{if(typeof p.x===c&&!(a.offsetWidth<=0)){var b=a.offsetWidth,d=J.offsetHeight,g=screen.deviceXDPI;if(b!=x||g!=screen.deviceXDPI){var m=typeof t.percent!==c?t.percent*b:t.offsetWidth,j=J.offsetWidth,f=Math.max(1,e.minGridWidth),l=Math.max(1,e.minChartWidth);if(m0&&u>0&&setTimeout(function(){e.splitterPositionChangeHandler(h,u)},0)}x=b;z=d}else if(d!=y){Ba(p,t,e);y=d}}}catch(w){try{clearInterval(a.splitterUpdateTimer)}catch(F){}}},100);typeof a.heightUpdateTimer!==c&&clearInterval(a.heightUpdateTimer);a.heightUpdateTimer=setInterval(function(){try{if(!(a.clientHeight<=0)){var b= +a.clientHeight;if(b!=z){var c=I(a,d,e);o.style.height=c;F.style.height=c;Ba(p,t,e);if(F.style.height!="auto")r.availableHeight=F.clientHeight;ta(r,ua(d,e));va(d,F,e);z=b}}}catch(g){try{clearInterval(a.heightUpdateTimer)}catch(m){}}},100);var A=function(a,b,g,m,j,f){var l;if(e.mouseHandler||e.mouseMoveHandler&&f=="mousemove"||e.mouseDownHandler&&f=="mousedown"||(e.clickHandler||e.itemClickHandler||e.chartClickHandler||e.chartItemClickHandler)&&f=="click"||(e.doubleClickHandler||e.itemDoubleClickHandler|| +e.chartDoubleClickHandler||e.chartItemDoubleClickHandler)&&f=="dblclick"){var n=a.which;!n&&a.button&&(a.button&1?n=1:a.button&4?n=2:a.button&2&&(n=3));l=j.getBoundingClientRect();var h=u.body,p=u.documentElement,j=l.left+(window.pageXOffset||p.scrollLeft||h.scrollLeft)-(p.clientLeft||h.clientLeft||0);l=Math.round(l.top+(window.pageYOffset||p.scrollTop||h.scrollTop)-(p.clientTop||h.clientTop||0));var j=Math.round(j),j=a.pageX-j,p=a.pageY-l,t=l=0,w,F;if(g)for(h=0;h0&&(ka=e.headerHeight/o);for(h=0;h0;)v.removeChild(v.childNodes[f]);var l= +[];for(f=C.childNodes.length;f-- >1;){var n=C.childNodes[f];if(n!=r.chartAreaAlternativeRows){n.tag!="Scale-Highlighting"&&(n.tag!="Scale-Highlighting-CurrentTime"&&n.tag!="Scale-Separator"&&n.tag!="Scale-Separator-CurrentTime")&&l.push(n);C.removeChild(n)}}hb(v,C,e.scales,e);for(f=0;f0;)C.appendChild(l[f]);ta(r,ua(d,e));F.scrollLeft=m*(a/j)-(m-g);setTimeout(function(){B= +false},200)}};a.setHourWidth=D;if(typeof e.isMouseWheelZoomEnabled===c||e.isMouseWheelZoomEnabled){b=function(b){b.preventDefault();b.stopPropagation();if(!B){var d=typeof b.wheelDelta!==c?b.wheelDelta>=0?1:-1:typeof b.detail!==c?-b.detail>=0?1:-1:0,e=a.settings,g=e.hourWidth,m=typeof e.isMouseWheelZoomEnabledMinHourWidth!==c?e.isMouseWheelZoomEnabledMinHourWidth:1;if(d<0)g=g/(1.2*-d);else if(d>0){g=g*1.2*d;d=typeof e.isMouseWheelZoomEnabledMaxHourWidth!==c?e.isMouseWheelZoomEnabledMaxHourWidth:20; +g>d&&(g=d)}g=a.visibleDayFinish){a.visibleWeekStart=0;a.visibleWeekFinish= +864E5}if(typeof a.visibleWeekStart===c)a.visibleWeekStart=0;if(typeof a.visibleWeekFinish===c)a.visibleWeekFinish=6;if(a.visibleWeekStart>a.visibleWeekFinish)if(a.visibleWeekStart==a.visibleWeekFinish+1){a.visibleWeekStart=0;a.visibleWeekFinish=6}else a.visibleWeekFinish=a.visibleWeekStart;if(typeof a.workingWeekStart===c)a.workingWeekStart=1;if(typeof a.workingWeekFinish===c)a.workingWeekFinish=5;if(a.workingWeekStart>a.workingWeekFinish)if(a.workingWeekStart==a.workingWeekFinish+1){a.workingWeekStart= +0;a.workingWeekFinish=6}else a.workingWeekFinish=a.workingWeekStart;a.workingDayStart=a.visibleDayStart;a.workingDayFinish=a.visibleDayFinish;if(typeof a.barMargin===c)a.barMargin=a.itemHeight/4;if(typeof a.barHeight===c)a.barHeight=a.itemHeight-a.barMargin*2;if(typeof a.barCornerRadius===c)switch(a.theme){default:a.barCornerRadius=0;break;case "Aero":a.barCornerRadius=3}if(typeof a.completedBarMargin===c)a.completedBarMargin=a.barHeight/2.5;if(typeof a.completedBarHeight===c)a.completedBarHeight= +a.barHeight-a.completedBarMargin*2;if(typeof completedBarCornerRadius===c)a.completedBarCornerRadius=0;if(typeof a.styleDefinitionTemplate===c)a.styleDefinitionTemplate=Fb(e,a);if(typeof a.standardBarStyle===c&&a.standardBarClass==null)switch(a.theme){default:a.standardBarStyle="fill: #8abbed; fill-opacity: 0.8; stroke: #8abbed; stroke-width: 0.65px";break;case "ModernBordered":a.standardBarStyle="fill: #8abbed; fill-opacity: 0.8; stroke: Blue; stroke-width: 0.65px";break;case "Aero":a.standardBarStyle= +"fill: url(#BlueGradient); fill-opacity: 0.8; stroke: Blue"}if(typeof a.standardCompletedBarStyle===c&&a.standardCompletedBarClass==null)switch(a.theme){default:a.standardCompletedBarStyle="fill: #3b87d9; stroke: #3b87d9; stroke-width: 0.65px";break;case "Aero":a.standardCompletedBarStyle="fill: #808080; stroke: #202020; stroke-width: 0.65px"}if(typeof a.summaryBarStyle===c&&a.summaryBarClass==null)switch(a.theme){default:a.summaryBarStyle="fill: #607080; stroke: #607080; stroke-width: 0.65px";break; +case "ModernBordered":a.summaryBarStyle="fill: #607080; stroke: #202020; stroke-width: 0.65px";break;case "Aero":a.summaryBarStyle="fill: url(#BlackGradient); stroke: Black"}if(typeof a.summaryCompletedBarStyle===c&&a.summaryCompletedBarClass==null)switch(a.theme){default:a.summaryCompletedBarStyle="fill: #404040; stroke: #404040; stroke-width: 0.65px";break;case "Aero":a.summaryCompletedBarStyle="fill: #a0a0a0; stroke: #303030; stroke-width: 0.65px"}if(typeof a.collapsedSummaryLineStyle===c&&a.collapsedSummaryLineClass== +null)a.collapsedSummaryLineStyle="stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2 2";if(typeof a.milestoneBarStyle===c&&a.milestoneBarClass==null)switch(a.theme){default:a.milestoneBarStyle="fill: #607080; stroke: #607080; stroke-width: 0.65px";break;case "ModernBordered":a.milestoneBarStyle="fill: #607080; stroke: #202020; stroke-width: 0.65px";break;case "Aero":a.milestoneBarStyle="fill: url(#BlackGradient); stroke: Black"}if(typeof a.baselineBarStyle===c&&a.baselineBarClass==null)switch(a.theme){default:a.baselineBarStyle= +"fill: none; stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2";break;case "Aero":a.baselineBarStyle="fill: none; stroke: Blue; stroke-dasharray: 2, 2"}if(typeof a.dependencyPointerStyle===c&&a.dependencyPointerClass==null)switch(a.theme){default:a.dependencyPointerStyle="fill: #3b87d9; stroke: #3b87d9; stroke-width: 0.65px";break;case "Aero":a.dependencyPointerStyle="fill: Blue; stroke: Blue"}if(typeof a.dependencyLineStyle===c&&a.dependencyLineClass==null)switch(a.theme){default:a.dependencyLineStyle= +"stroke: #3b87d9; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)";break;case "Aero":a.dependencyLineStyle="stroke: Blue; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)"}if(typeof a.dependencyLineZoneStyle===c&&a.dependencyLineZoneClass==null)a.dependencyLineZoneStyle="stroke: White; stroke-opacity: 0; stroke-width: 4px; fill: none";if(typeof a.temporaryDependencyLineStyle===c&&a.temporaryDependencyLineClass==null)switch(a.theme){default:a.temporaryDependencyLineStyle= +"stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#ArrowMarker)";break;case "Aero":a.temporaryDependencyLineStyle="stroke: Blue; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#ArrowMarker)"}if(typeof a.assignmentsStyle===c&&a.assignmentsClass==null)a.assignmentsStyle="stroke-width: 0.25px; font-size: x-small";if(typeof a.standardTaskTemplate===c)a.standardTaskTemplate=Gb();if(typeof a.summaryTaskTemplate===c)a.summaryTaskTemplate= +Hb();if(typeof a.milestoneTaskTemplate===c)a.milestoneTaskTemplate=Ib();if(typeof a.horizontalChartLines!==c){var n=a.internalPreTaskTemplate;a.internalPreTaskTemplate=function(b){if(typeof b.scheduleChartItem!==c)return typeof n!==c?n(b):null;var d=b.ganttChartView.ownerDocument,e=d.createElementNS("http://www.w3.org/2000/svg","g");typeof n!==c&&e.appendChild(n(b));var g=d.createElementNS("http://www.w3.org/2000/svg","line");g.setAttribute("x1",0);g.setAttribute("y1",-0.5);g.setAttribute("x2",H(a.timelineFinish, +a));g.setAttribute("y2",-0.5);g.setAttribute("style","stroke: "+a.horizontalChartLines+"; stroke-width: 0.5px");e.appendChild(g);if(b.index==b.ganttChartView.items.length-1){g=d.createElementNS("http://www.w3.org/2000/svg","line");g.setAttribute("x1",0);g.setAttribute("y1",a.itemHeight+0.5);g.setAttribute("x2",H(a.timelineFinish,a));g.setAttribute("y2",a.itemHeight+0.5);g.setAttribute("style","stroke: "+a.horizontalChartLines+"; stroke-width: 0.5px");e.appendChild(g)}return e}}if(typeof a.isTaskToolTipVisible=== +c)switch(a.target){default:a.isTaskToolTipVisible=true;break;case "Phone":a.isTaskToolTipVisible=false}if(typeof a.itemTemplate===c)a.itemTemplate=Jb(a);if(typeof a.areTaskAssignmentsVisible===c)a.areTaskAssignmentsVisible=true;if(typeof a.assignmentsTemplate===c)a.assignmentsTemplate=Kb();if(typeof a.isTaskCompletedEffortVisible===c)a.isTaskCompletedEffortVisible=true;if(typeof a.areTaskDependenciesVisible===c)a.areTaskDependenciesVisible=true;if(typeof a.dependencyLineTemplate===c)a.dependencyLineTemplate= +Lb();if(typeof a.isDependencyToolTipVisible===c)a.isDependencyToolTipVisible=a.isTaskToolTipVisible;if(typeof a.predecessorItemTemplate===c)a.predecessorItemTemplate=Mb(a);if(typeof a.isDraggingTaskStartEndsEnabled===c)a.isDraggingTaskStartEndsEnabled=true;if(typeof a.areTaskDependencyConstraintsEnabledWhileDragging===c)a.areTaskDependencyConstraintsEnabledWhileDragging=false;if(typeof a.isTaskStartReadOnly===c)a.isTaskStartReadOnly=false;if(typeof a.isTaskEffortReadOnly===c)a.isTaskEffortReadOnly= +false;if(typeof a.isTaskCompletionReadOnly===c)a.isTaskCompletionReadOnly=false;if(typeof a.areTaskPredecessorsReadOnly===c)a.areTaskPredecessorsReadOnly=false;if(typeof a.isBaselineVisible===c)a.isBaselineVisible=true;if(typeof a.isSummaryTaskCompletedEffortVisible===c)a.isSummaryTaskCompletedEffortVisible=false;var w=null;if(a.isIndividualItemNonworkingTimeHighlighted||a.areTaskInterruptionsHighlighted)for(d=0;d=b.start?g:b.start,finish:m<=b.finish?m:b.finish});e=typeof e!==c&&typeof e.specialNonworkingDays!==c?e.specialNonworkingDays:a.specialNonworkingDays;if(typeof e!==c)for(var f=0;f=b.start&&m<=b.finish&&d.push({start:g,finish:m})}}if(d==null||d.length==0)return typeof t!== +c?t(b):null;g=b.ganttChartView.ownerDocument;m=g.createElementNS("http://www.w3.org/2000/svg","g");for(e=0;e=0&&p0?"auto":e.itemHeight+"px";else{var c=a.clientHeight-e.headerHeight-2;c<0&&(c=0);b=c+"px";if(c0?"auto":e.itemHeight+"px"}a.isContentHeightInitialized=true}return b},L=function(a,d){if(typeof d.toggleButtonAreaWidth!==c)return d.toggleButtonAreaWidth;var e=0;if(d.isGridVisible)for(var b=0;b0){e=16;break}return d.toggleButtonAreaWidth=e},Q=function(a, +d){var e=a.createElement("span");e.innerHTML=d;return e},V=function(a,d){return d==true?a.createTextNode("\u2713"):a.createTextNode("")},Z=function(a){var d=a.getFullYear(),e=a.getMonth()+1;e<10&&(e="0"+e);a=a.getDate();a<10&&(a="0"+a);return e+"/"+a+"/"+d},sa=function(a){var d=Z(a),e=a.getHours();e<10&&(e="0"+e.toString());a=a.getMinutes();a<10&&(a="0"+a.toString());return d+" "+e+":"+a},x=function(a){return new Date(a.valueOf()+a.getTimezoneOffset()*6E4)},o=function(a){var d=new Date;if(a==null|| +a=="")return d;var e,b,c,f;c=a.indexOf(" ");if(c>=0){e=a.substr(0,c);f=a.substr(c+1)}else{e=a;f="0"}c=e.indexOf("/");if(c>=0){for(a=e.substr(0,c);a.length>0&&a.substr(0,1)=="0";)a=a.substr(1);a=parseInt(a)-1;e=e.substr(c+1);c=e.indexOf("/");if(c>=0){b=e.substr(0,c);for(c=e.substr(c+1);c.length>0&&c.substr(0,1)=="0";)c=c.substr(1);e=parseInt(c)}else{b=e;e=d.getFullYear()}for(;b.length>0&&b.substr(0,1)=="0";)b=b.substr(1);b=parseInt(b)}else{for(;e.length>0&&e.substr(0,1)=="0";)e=e.substr(1);b=parseInt(e); +a=d.getMonth();e=d.getFullYear()}var h;c=f.indexOf(":");if(c>=0){h=f.substr(0,c);f=f.substr(c+1)}else{h=f;f="0"}for(;h.length>1&&h.substr(0,1)=="0";)h=h.substr(1);for(c=parseInt(h);f.length>1&&f.substr(0,1)=="0";)f=f.substr(1);f=parseInt(f);return isNaN(e)||isNaN(a)||isNaN(b)||e<=0||a<0||a>=12||b<1||b>aa[a]+(a!=1||!(e%400==0||(e%100==0?0:e%4==0))?0:1)?isNaN(c)||isNaN(f)||c<0||c>=24||f<0||f>=60?d:new Date(d.getFullYear(),d.getMonth(),d.getDate(),c,f,0,0):isNaN(c)||isNaN(f)||c<0||c>=24||f<0||f>=60? +new Date(e,a,b,0,0,0,0):new Date(e,a,b,c,f,0,0)},k=function(a){return new Date(a.valueOf()-a.getTimezoneOffset()*6E4)},s=function(a,d){var e=a.ownerDocument,b=e.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("style","width: 12px; height: 12px; vertical-align: initial");b.setAttribute("focusable","false");e=e.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("id","PART_Border");e.setAttribute("width","12");e.setAttribute("height","12");e.setAttribute("style","fill: White; fill-opacity: 0"); +b.appendChild(e);a.setAttribute("id","PART_Button");typeof d.toggleButtonClass!==c&&a.setAttribute("class",d.toggleButtonClass);typeof d.toggleButtonStyle!==c&&a.setAttribute("style",d.toggleButtonStyle);b.appendChild(a);return b},q=function(a,d){typeof d!=="object"&&(d={});K(d);var e=[{header:"",width:32,isSelection:true},{header:"Task",width:140,isTreeView:true},{header:"Start",width:140},{header:"Finish",width:140},{header:"Milestone",width:80},{header:"Completed",width:80},{header:"Assignments", +width:200}];e[0].cellTemplate=v(d,e[0],a);e[1].cellTemplate=A(d,e[1],a);e[1].exportCellTemplate=A(d,e[1],a,false);e[2].cellTemplate=Nb(d,e[2]);e[2].exportCellTemplate=Nb(d,e[2],false);e[3].cellTemplate=Ob(d,e[3]);e[3].exportCellTemplate=Ob(d,e[3],false);e[4].cellTemplate=G(d,e[4]);e[4].exportCellTemplate=G(d,e[4],false);e[5].cellTemplate=Pb(d,e[5]);e[5].exportCellTemplate=Pb(d,e[5],false);e[6].cellTemplate=Qb(d,e[6]);e[6].exportCellTemplate=Qb(d,e[6],false);d.selectionMode!="Single"&&(d.selectionMode!= +"Extended"&&d.selectionMode!="ExtendedFocus")&&e.splice(0,1);return e},v=function(a,d,e){return function(b){return!d.isReadOnly?C(b,a,e):V(b.ganttChartView.ownerDocument,b.isSelected)}},C=function(a,d){var e=a.ganttChartView.ownerDocument,b;if(typeof a.selectionInput===c){b=e.createElement("input");a.selectionInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px")}else b=a.selectionInput;if(a.isSelected){b.setAttribute("checked","checked");if(!b.checked)b.checked=true}else if(b.checked)b.checked= +false;var g=function(){b.checked?r(a,true,d.selectionMode):r(a,false,d.selectionMode)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);b.addEventListener("change",g,true);b.changeEventListener=g;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress",b.keyPressEventListener,true);b.addEventListener("keypress",e,true);b.keyPressEventListener=e;return b},r=function(a, +d,e){a.isSelected=d;y(a,"isSelected",true,true);Rb(a);if(typeof a.ganttChartView!==c){a.ganttChartView.selectedItem=a;if(e!="Extended"&&e!="ExtendedFocus")a.ganttChartView.selectedItems=[a];var b;if(e!="Extended"&&e!="ExtendedFocus")for(b=0;b +a.start,d,m;if(e.isTaskEffortPreservedWhenStartChangesInGrid){d=da(a,e);m=ya(a,e)}a.start=R(k(e.dateTimeParser(g.value)),e,true,a.isMilestone,D(a));a.preferredStart=a.start;if(a.isMilestone)a.finish=a.start;y(a,"start",true,true);if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}if(typeof a.completedInput!== +c){b=a.completedInput;typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);delete a.completedInput}if(e.isTaskEffortPreservedWhenStartChangesInGrid){Wa(a,d,e);Xa(a,m,e)}}Y(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",m,true);g.changeEventListener=m;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();m(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress", +g.keyPressEventListener,true);g.addEventListener("keypress",d,true);g.keyPressEventListener=d;return g},Ob=function(a,d,e){var b=function(b){return typeof b.finish===c||typeof b.isMilestone!==c&&b.isMilestone==true&&typeof b.start!==c&&b.finish.valueOf()==b.start.valueOf()||typeof b.isSummaryEnabled!==c&&!b.isSummaryEnabled&&typeof b.isBarVisible!==c&&!b.isBarVisible?b.ganttChartView.ownerDocument.createTextNode(""):b.ganttChartView.ownerDocument.createTextNode(a.dateTimeFormatter(x(b.finish)))}; +return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly)&&!(typeof e.isSummaryEnabled!==c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Dc(e,Math.max(0,d.width-16),a):b(e)}:b},Dc=function(a,d,e){var b=a.ganttChartView.ownerDocument,g;if(typeof a.finishInput===c){g=b.createElement("input");a.finishInput=g;try{g.type=e.dateTimePickerType}catch(f){g.type="text"}g.addEventListener("focus",function(){z(a,e)}, +false);g.addEventListener("focus",function(){g.style.backgroundColor="White"},false);g.addEventListener("blur",function(){g.style.backgroundColor="Transparent"},false)}else g=a.finishInput;if(typeof a.finish!==c)g.value=e.dateTimeFormatter(x(a.finish));DlhSoft.Controls.DatePicker&&(e.dateTimePickerType=="text"&&e.useDatePicker)&&g.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var d=(e.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(g); +if(!d||!d.isOpen){var c=0,m=0;try{c=g.selectionStart;m=g.selectionEnd}catch(f){}d=(e.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(g,void 0,{inputStyle:null,isDropDownButtonVisible:false,defaultTimeOfDay:e.workingDayFinish,dateTimeFormatter:e.dateTimeFormatter,dateTimeParser:e.dateTimeParser,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid "+e.border,disabledDateSelector:Sb(e),disabledTimeSelector:U(e, +a),calendarSelectorLevels:e.calendarSelectorLevels,months:e.months,daysOfWeek:Va(e.daysOfWeek)},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");d.openDropDown();setTimeout(function(){try{g.selectionStart=c;g.selectionEnd=m}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{g.focus()}catch(a){}},100):b.createEvent&&setTimeout(function(){var a=b.createEvent("MouseEvents"); +a.initEvent("blur",true,false);g.dispatchEvent(a)})}}},true);var h="";typeof a.isMilestone!==c&&a.isMilestone==true&&(h="; visibility: hidden");var m="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))m="; font-weight: bold";g.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+h+m);a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)?g.setAttribute("disabled","true"):g.removeAttribute("disabled");var j=function(){if(!a.hasChildren|| +!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var b=k(e.dateTimeParser(g.value));g.value.length>0&&(g.value.indexOf(" ")<0&&ja(b)==0)&&(b=$(b));a.finish=R(b,e,a.isMilestone,true,D(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}if(typeof a.completedInput!==c){b=a.completedInput;typeof b.changeEventListener!== +c&&b.removeEventListener("change",b.changeEventListener,true);delete a.completedInput}}Y(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",j,true);g.changeEventListener=j;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();j(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress",g.keyPressEventListener,true);g.addEventListener("keypress",d,true);g.keyPressEventListener=d;return g},Sb=function(a){return function(d){if(d.getDay()< +a.workingWeekStart||d.getDay()>a.workingWeekFinish)return true;d=k(d).valueOf();if(a.specialNonworkingDays)for(var e=0;e=a.visibleDayFinish}},U=function(a,d){return function(e){return(X(d.start)a.visibleDayFinish}},Va=function(a){if(a){for(var d=[],e=0;e0?b[0].toUpperCase()+(b.length>1?b[1]:""):"";d.push(b)}return d}},G=function(a,d,e){var b=function(a){return typeof a.isMilestone===c||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):V(a.ganttChartView.ownerDocument,a.isMilestone)};return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly)&&!(typeof e.isSummaryEnabled!== +c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Ec(e,a):b(e)}:b},Ec=function(a,d){var e=a.ganttChartView.ownerDocument,b;if(typeof a.milestoneInput===c){b=e.createElement("input");a.milestoneInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px; margin-left: 2px; margin-right: 2px");b.addEventListener("focus",function(){z(a,d)},false)}else b=a.milestoneInput;(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))&&typeof a.isMilestone!==c&&a.isMilestone? +b.setAttribute("checked",true):b.removeAttribute("checked");if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var g=function(){if(b.checked){a.isMilestone=true;y(a,"isMilestone",true,true);if(a.finish>a.start){a.finish=a.start;y(a,"finish",false,true)}if(a.completedFinish>a.start){a.completedFinish=a.start;y(a,"completedFinish",false,true)}}else{a.isMilestone=false;y(a,"isMilestone",true,true)}Y(a)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener, +true);b.addEventListener("change",g,true);b.changeEventListener=g;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress",b.keyPressEventListener,true);b.addEventListener("keypress",e,true);b.keyPressEventListener=e}else b.setAttribute("style","visibility: hidden");return b},Qb=function(a,d,e){var b=function(a){return typeof a.assignmentsContent===c||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!== +c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):Q(a.ganttChartView.ownerDocument,a.assignmentsContent)};return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly&&!a.isAssignmentsContentReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly)&&!(typeof e.isSummaryEnabled!==c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Fc(e,Math.max(0,d.width-16),a):b(e)}:b},Fc=function(a,d,e){var b=a.ganttChartView,g=b.ownerDocument,f;if(typeof a.assignmentsContentInput=== +c){f=g.createElement("input");a.assignmentsContentInput=f;f.type="text";f.addEventListener("focus",function(){z(a,e)},false);var h=function(){a.assignmentsContent=f.value;y(a,"assignmentsContent",true,true);if(!a.hasChildren&&a.hasFixedEffort){a.fixedEffort=da(a,e);a.fixedEffortAssignments=fa(a)}na(a);var b=null;DlhSoft.Controls.MultiSelectorComboBox&&(b=DlhSoft.Controls.MultiSelectorComboBox.get(f));if(b!=null&&b.availableChoices.length>0)var d=setInterval(function(){if(!b.isOpen&&g.activeElement!= +a.assignmentsContentInput){clearInterval(d);Y(a)}},100);else Y(a)};typeof f.changeEventListener!==c&&f.removeEventListener("change",f.changeEventListener,true);f.addEventListener("change",function(a){f.dontAutoFocus=true;h(a)},true);f.changeEventListener=h;var m=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();typeof f.dontAutoFocus!==c&&delete f.dontAutoFocus;h(a)}};typeof f.keyPressEventListener!==c&&f.removeEventListener("keypress",f.keyPressEventListener,true);f.addEventListener("keypress", +m,true);f.keyPressEventListener=m;f.addEventListener("focus",function(){f.style.backgroundColor="White"},false);f.addEventListener("blur",function(){f.style.backgroundColor="Transparent"},false)}else f=a.assignmentsContentInput;if(typeof a.assignmentsContent!==c)f.value=a.assignmentsContent;DlhSoft.Controls.MultiSelectorComboBox&&e.useResourceSelector&&f.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var d=DlhSoft.Controls.MultiSelectorComboBox.get(f);if(!d||!d.isOpen&&d.availableChoices.length> +0){d=e.assignableResources;if(typeof d===c){d=Ia(b.items);e.assignableResources=d}var m=0,n=0;try{m=f.selectionStart;n=f.selectionEnd}catch(h){}d=DlhSoft.Controls.MultiSelectorComboBox.initialize(f,d,void 0,{inputStyle:null,autoAppendAvailableChoices:e.autoAppendAssignableResources,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; color: Black; border: 1px solid "+e.border+"; font-size: small; max-height: 188px; overflow-y: auto"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); +d.openDropDown();setTimeout(function(){try{f.selectionStart=m;f.selectionEnd=n}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{f.focus()}catch(a){}},100):g.createEvent&&setTimeout(function(){var a=g.createEvent("MouseEvents");a.initEvent("blur",true,false);f.dispatchEvent(a)})}}},true);m="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))m="; font-weight: bold";f.setAttribute("style","background-color: Transparent; width: "+ +d+"px; border-width: 0px; padding: 0px"+m);return f},Pb=function(a,d,e){var b=function(a){return typeof a.start===c||typeof a.finish===c||a.finish.valueOf()==a.start.valueOf()||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):V(a.ganttChartView.ownerDocument,a.ganttChartView.isItemCompleted(a))};return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly=== +c||!e.isReadOnly)&&(!e.hasChildren||!(typeof e.isSummaryEnabled===c||e.isSummaryEnabled))&&!(typeof e.isSummaryEnabled!==c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Gc(e,a):b(e)}:b},Gc=function(a,d){var e=a.ganttChartView.ownerDocument,b;if(typeof a.completedInput===c){b=e.createElement("input");a.completedInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px; margin-left: 2px; margin-right: 2px");b.addEventListener("focus",function(){z(a,d)},false)}else b=a.completedInput; +a.isSetAsCompleted||(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))&&a.completedFinish>=a.finish&&a.finish>a.start&&(typeof a.isMilestone===c||!a.isMilestone)?b.setAttribute("checked",true):b.removeAttribute("checked");a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)&&b.setAttribute("style","visibility: hidden");var g=function(){if(b.checked){if(a.completedFinisha.start){a.completedFinish=a.start;y(a,"completedFinish",true,true)}if(a.isMilestone||a.finish.valueOf()<=a.start.valueOf())a.isSetAsCompleted=false}Y(a)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);b.addEventListener("change",g,true);b.changeEventListener=g;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress", +b.keyPressEventListener,true);b.addEventListener("keypress",e,true);b.keyPressEventListener=e;return b},gb=function(a){for(var d=0,e=0;e=4?2:d.width/2;g.setAttribute("style","padding-left: "+f+"px; padding-right: "+f+"px; overflow-x: hidden; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+d.width+"px");f=a.createElement("div");typeof d.headerClass!==c&&f.setAttribute("class",d.headerClass);typeof d.headerStyle!==c&&f.setAttribute("style",d.headerStyle);f.appendChild(Q(a,d.header));g.appendChild(f);b.appendChild(g);if(d.width>= +1&&(typeof e.allowUserToResizeColumns===c||e.allowUserToResizeColumns)&&(typeof d.allowUserToResize===c||d.allowUserToResize)){b.isGripperVisible=false;var h=d.ganttChartView,m=function(a){b.isGripperVisible=a;b.style.cursor=a?"e-resize":"default";b.style.borderRight=a?"solid 1px "+e.border:e.verticalGridLines?"solid 1px "+e.verticalGridLines:"";g.style.width=d.width-(b.style.borderRight?1:0)+"px"};e.verticalGridLines&&m();var j=e.splitterWidth;b.addEventListener("mouseover",function(a){if(!DlhSoft.Controls.GanttChartView.isGripperDragging&& +!(b.isGripperDragging||typeof a.offsetX===c&&a.currentTarget!=b))m((typeof a.offsetX!==c?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=d.width-j)},true);b.addEventListener("mousemove",function(a){if(!DlhSoft.Controls.GanttChartView.isGripperDragging&&!(b.isGripperDragging||typeof a.offsetX===c&&a.currentTarget!=b))m((typeof a.offsetX!==c?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=d.width-j)},true);g.addEventListener("mouseover",function(a){!DlhSoft.Controls.GanttChartView.isGripperDragging&& +(!b.isGripperDragging&&!(typeof a.offsetX!==c||a.currentTarget!=g))&&m(a.layerX-a.currentTarget.offsetLeft>=d.width-j)},false);g.addEventListener("mousemove",function(a){!DlhSoft.Controls.GanttChartView.isGripperDragging&&(!b.isGripperDragging&&!(typeof a.offsetX!==c||a.currentTarget!=g))&&m(a.layerX-a.currentTarget.offsetLeft>=d.width-j)},false);b.addEventListener("mousedown",function(a){if(!(a.button!=0||!b.isGripperVisible||DlhSoft.Controls.GanttChartView.isGripperDragging)){DlhSoft.Controls.GanttChartView.isGripperDragging= +true;b.isGripperDragging=true;b.initialGripperDraggingX=a.clientX;b.initialColumnWidth=d.width}},true);a.addEventListener("mousemove",function(a){if(b.isGripperDragging){d.width=Math.max(d.minWidth,b.initialColumnWidth+(a.clientX-b.initialGripperDraggingX));if(typeof d.maxWidth!==c&&d.width>d.maxWidth)d.width=d.maxWidth;g.style.width=d.width-1+"px";typeof e.columnWidthChangeHandler!==c&&setTimeout(function(){e.columnWidthChangeHandler(d,d.width)},0);if(!h.isWaitingToRefreshColumns){h.isWaitingToRefreshColumns= +true;setTimeout(function(){var a=gb(e.columns);h.gridHeader.style.width=a+"px";h.gridContent.style.width=a+"px";delete h.isWaitingToRefreshColumns;h.refreshGridItems()},0)}}},true);a.addEventListener("mouseup",function(){if(b.isGripperDragging){delete b.isGripperDragging;delete b.initialGripperDraggingX;delete b.initialColumnWidth;m(false);delete DlhSoft.Controls.GanttChartView.isGripperDragging}},true);b.addEventListener("mouseout",function(){b.isGripperDragging||m(false)},false)}return b},ca=function(a, +d){for(var e=-1,b=null,g=null,f=[],h=0;hj){m.indentation=j;y(m,"indentation",false,true)}b.hasChildren=m.indentation>b.indentation;if(b.hasChildren&& +typeof b.isMilestone!==c&&b.isMilestone){b.isMilestone=false;y(b,"isMilestone",false,true)}}}m.isVisible=e<0||m.indentation<=e;if(typeof m.scheduleChartItem===c){if(m.isVisible&&!m.isExpanded)e=m.indentation;m.isExpanded&&m.indentation==e&&(e=-1);b=m}}if(b!=null)b.hasChildren=false;d.selectedItem=g;d.selectedItems=f},Ha=function(a,d,e){e.isTimingInformationInitialized=false;e.isBasicTimingInformationInitialized=false;var b=X(d.currentTime),g=[],f,h,m;for(h=0;h0&&(j=g[g.length-1]);j!=null&&f.indentation<=j.indentation;){g.pop();j=g[g.length-1]}f.parent=j;f.children=[];j!=null&&j.children.push(f);if(!f.hasChildren||!(typeof f.isSummaryEnabled===c||f.isSummaryEnabled)){m=f.start;var l=f.finish,n=f.completedFinish;if(typeof f.start===c){f.start=b;f.preferredStart=f.start}if(typeof f.finish===c)f.finish=typeof f.isMilestone===c||!f.isMilestone?$(b):f.start;if(typeof f.isSetAsCompleted===c)f.isSetAsCompleted=typeof f.completedFinish!==c&&f.completedFinish.valueOf()== +f.finish.valueOf();if(typeof f.completedFinish===c)f.completedFinish=f.start;if(typeof f.isRelativeToTimezone===c||f.isRelativeToTimezone){f.start=new Date(f.start.valueOf()-f.start.getTimezoneOffset()*6E4);f.ftart=f.start;f.finish=new Date(f.finish.valueOf()-f.finish.getTimezoneOffset()*6E4);f.completedFinish=typeof f.completedFinish==="number"?S(f.start,f.completedFinish*O(f.start,f.finish,d,D(f)),d,D(f)):new Date(f.completedFinish.valueOf()-f.completedFinish.getTimezoneOffset()*6E4);if(typeof f.baselineStart!== +c)f.baselineStart=new Date(f.baselineStart.valueOf()-f.baselineStart.getTimezoneOffset()*6E4);if(typeof f.baselineFinish!==c)f.baselineFinish=new Date(f.baselineFinish.valueOf()-f.baselineFinish.getTimezoneOffset()*6E4);if(typeof f.minStart!==c)f.minStart=new Date(f.minStart.valueOf()-f.minStart.getTimezoneOffset()*6E4);if(typeof f.maxStart!==c)f.maxStart=new Date(f.maxStart.valueOf()-f.maxStart.getTimezoneOffset()*6E4);if(typeof f.minFinish!==c)f.minFinish=new Date(f.minFinish.valueOf()-f.minFinish.getTimezoneOffset()* +6E4);if(typeof f.maxFinish!==c)f.maxFinish=new Date(f.maxFinish.valueOf()-f.maxFinish.getTimezoneOffset()*6E4);f.isRelativeToTimezone=false}else if(typeof f.completedFinish==="number")f.completedFinish=S(f.start,f.completedFinish*O(f.start,f.finish,d,D(f)),d,D(f));if(typeof f.minStart!==c&&f.startf.maxStart)f.start=f.maxStart;if(typeof f.maxFinish!==c&&f.finish>f.maxFinish)f.finish=f.maxFinish;else if(typeof f.minFinish!==c&&f.finish< +f.minFinish)f.finish=f.minFinish;if(f.finishf.finish)f.completedFinish=f.finish;if(typeof f.loadChartItem===c)f.start=R(f.start,d,true,typeof f.isMilestone!==c&&f.isMilestone,D(f));typeof f.dependsOf!==c&&delete f.dependsOf;f.preferredStart=f.start;if(typeof f.loadChartItem===c){f.finish=R(f.finish,d,typeof f.isMilestone!==c&&f.isMilestone,true,D(f));f.completedFinish=R(f.completedFinish,d,typeof f.isMilestone!== +c&&f.isMilestone,true,D(f))}if(f.finishf.finish)f.completedFinish=f.finish;if(typeof f.isSetAsCompleted!==c&&(!f.isMilestone||f.completedFinish.valueOf()f.start){l.start=f.start;y(l,"start",false,true)}if(typeof l.finish===c||l.finishj.indentation)&&g.push(f)}e.isBasicTimingInformationInitialized=true;for(h=a.length;h-- >0;){f=a[h];f.hasChildren&&(typeof f.isSummaryEnabled===c||f.isSummaryEnabled)&&Ya(f)}if(d.areTaskDependencyConstraintsEnabled)for(h=0;h0)&&Ka(f,a,d,e)}for(h=0;hm.start)a.start=m.start;if(typeof a.finish=== +c||a.finishd.visibleWeekFinish?c+(d.visibleWeekFinish-d.visibleWeekStart+1)*e:c+(b-d.visibleWeekStart)*e,e=ja(a);b>=d.visibleWeekStart&& +b<=d.visibleWeekFinish&&(c=e<=d.visibleDayStart?c+0:e>=d.visibleDayFinish?c+(d.visibleDayFinish-d.visibleDayStart)/36E5*d.hourWidth:c+(e-d.visibleDayStart)/36E5*d.hourWidth);return c},Ca=function(a,d){for(var e=d.timelineStart.valueOf(),b=Za(d),c=Za(d)*(d.visibleWeekFinish-d.visibleWeekStart+1);a>c;){e=e+6048E5;a=a-c}for(e=e+Math.max(0,d.visibleWeekStart-d.weekStartDay)*864E5;a>b;){e=e+864E5;a=a-b}e=e+d.visibleDayStart;e=e+a/d.hourWidth*36E5;return new Date(e)},Eb=function(a){switch(a.theme){default:return[{scaleType:"NonworkingTime", +isHeaderVisible:false,isHighlightingVisible:true,highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px"},{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: #8bbf8a; stroke-width: 0.5px"}];case "ModernBordered":return[{scaleType:"NonworkingTime",isHeaderVisible:false,isHighlightingVisible:true, +highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px; border-right: solid 1px White; border-bottom: solid 1px White",isSeparatorVisible:true,separatorStyle:"stroke: #c8bfe7; stroke-width: 0.5px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px; border-right: solid 1px White"},{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: #8bbf8a; stroke-width: 1px"}]; +case "Aero":return[{scaleType:"NonworkingTime",isHeaderVisible:false,isHighlightingVisible:true,highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px; border-right: solid 1px #c8bfe7; border-bottom: solid 1px #c8bfe7",isSeparatorVisible:true,separatorStyle:"stroke: #c8bfe7; stroke-width: 0.5px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px; border-right: solid 1px #c8bfe7"}, +{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: Black; stroke-width: 1px"}]}},oa=function(a,d){return new Date(Math.floor((a-2592E5).valueOf()/d.updateScale)*d.updateScale+2592E5)},hb=function(a,d,e,b,g){typeof g===c&&(g=false);var f=a.ownerDocument,h=0,m,j;for(m=0;m0&&(l=b.headerHeight/h);for(m=0;mw&&(typeof j.isHeaderVisible===c||j.isHeaderVisible))J=w;Jb.timelineFinish)p=b.timelineFinish;p0?864E5:0));g=Jc(b),b0?864E5: +0));g=Kc(b),bd){a=$(a);return new Date(X(a).valueOf()+ +e)}return new Date(a.valueOf())},$=function(a){return new Date(a.valueOf()+864E5)},La=function(a){return new Date(a.valueOf()-864E5)},xa=function(a){return new Date(a.valueOf()+6048E5)},Kc=function(a){var d=a.getTimezoneOffset(),a=new Date(a.valueOf()+(d>0?864E5:0)),e=a.getMonth()+1;if(e>=12){e=0;a.setFullYear(a.getFullYear()+1)}a.setMonth(e,1);e=a.getTimezoneOffset();return new Date(a.valueOf()-(e-d)*6E4-(e>0?864E5:0))},Jc=function(a){var d=a.getTimezoneOffset(),a=new Date(a.valueOf()+(d>0?864E5: +0));a.setFullYear(a.getFullYear()+1);a.setMonth(0,1);var e=a.getTimezoneOffset();return new Date(a.valueOf()-(e-d)*6E4-(e>0?864E5:0))},Tb=function(a,d){if(typeof d===c)return false;for(var e=a.valueOf(),b=0;b0?d[0].toUpperCase():"";case "Day":a=new Date(a.valueOf()+a.getTimezoneOffset()*6E4);return(a.getDate()< +10?"0":"")+a.getDate();case "Month":return e.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()];case "MonthAbbreviation":d=e.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()];return d.length<=0?"":d[0].toUpperCase()+(d.length>1?d.substr(1,Math.min(3,d.length)-1):"");case "Year":return(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getFullYear();case "MonthYear":return e.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()]+ +" "+(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getFullYear();default:return d.headerText?d.headerText:a.toString()}},Ac=function(a,d,e,b,g,f,h){for(var m=0,j=0;jg){e=e+d.itemHeight;g=b++}else{e=Math.max(e,h.itemTop+d.itemHeight);g=h.displayRowIndex}}return e},za=function(a,d,e){if(a.isPart)return za(a.ganttChartItem,d,e);var b;if(typeof a.displayRowIndex!==c){b=a.displayRowIndex*e.itemHeight;return a.itemTop=b}for(var g=b=0;gb.count){m=document.createElementNS("http://www.w3.org/2000/svg","rect");m.setAttribute("x",0);m.setAttribute("y",f*e.itemHeight);m.setAttribute("width",d.clientWidth); +m.setAttribute("height",e.itemHeight);typeof e.alternativeChartItemClass!==c&&m.setAttribute("class",e.alternativeChartItemClass);typeof e.alternativeChartItemStyle!==c&&m.setAttribute("style",e.alternativeChartItemStyle);m.index=f;b.appendChild(m)}}b.count=f}else{j.setAttribute("class","");j.setAttribute("style","")}f++}}for(g=b.childNodes.length;g-- >0;){a=b.childNodes[g];a.index>b.count&&b.removeChild(a)}}},Ub=function(a,d,e,b,g,f){var h=a.ganttChartView.ownerDocument,m=h.createElement("div"); +typeof f.itemClass!==c&&m.setAttribute("class",f.itemClass);typeof f.itemStyle!==c&&m.setAttribute("style",f.itemStyle);var j=h.createElement("div");a.alternativeContentContainer=j;var l=h.createElement("div");try{l.addEventListener("mousedown",function(b){b.target!=a.selectionInput&&z(a,f)},false);l.addEventListener("mouseup",function(b){b.target!=a.selectionInput&&z(a,f)},false)}catch(n){}if(a.isSelected){typeof f.selectedItemClass!==c&&l.setAttribute("class",f.selectedItemClass);typeof f.selectedItemStyle!== +c&&l.setAttribute("style",f.selectedItemStyle)}var w=h.createElement("div");typeof a["class"]!==c&&w.setAttribute("class",a["class"]);typeof a.style!==c&&w.setAttribute("style",a.style);var u=h.createElement("div");if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){typeof f.summaryItemClass!==c&&u.setAttribute("class",f.summaryItemClass);typeof f.summaryItemStyle!==c&&u.setAttribute("style",f.summaryItemStyle)}else if(a.isMilestone){typeof f.milestoneItemClass!==c&&u.setAttribute("class", +f.milestoneItemClass);typeof f.milestoneItemStyle!==c&&u.setAttribute("style",f.milestoneItemStyle)}else{typeof f.standardItemClass!==c&&u.setAttribute("class",f.standardItemClass);typeof f.standardItemStyle!==c&&u.setAttribute("style",f.standardItemStyle)}h=h.createElement("div");a.gridItem=h;a.gridItemContent=u;a.gridItemSelectionContainer=l;var t=f.itemHeight;if(!a.isVisible||typeof a.isHidden!==c&&a.isHidden)t=0;h.setAttribute("style","overflow: hidden; height: "+t+"px");Aa(h,a,d,e,b,g,f);u.appendChild(h); +w.appendChild(u);l.appendChild(w);j.appendChild(l);m.appendChild(j);a.gridItemContainer=m;(typeof f.isGridRowClickTimeScrollingEnabled===c||f.isGridRowClickTimeScrollingEnabled)&&m.addEventListener("mouseup",function(){var d;if(typeof a.ganttChartItems===c)d=a.start;else{d=null;for(var e=0;e=b.container.clientWidth/2.5&&(e=d);b.container.scrollLeft= +Math.max(0,e)},true);return m},Aa=function(a,d,e,b,g,f,h){var m=d.ganttChartView.ownerDocument;if(!h.isVirtualizing||typeof d.isVirtuallyVisible!==c&&d.isVirtuallyVisible){var j=function(){if(typeof d.gridItemSelectionContainer!==c){var j=d.gridItemSelectionContainer;typeof h.selectedItemClass!==c&&j.setAttribute("class",d.isSelected?h.selectedItemClass:null);typeof h.selectedItemStyle!==c&&j.setAttribute("style",d.isSelected?h.selectedItemStyle:null)}if(typeof d.gridItemContent!==c){j=d.gridItemContent; +j.setAttribute("class","");j.setAttribute("style","");if(d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)){typeof h.summaryItemClass!==c&&j.setAttribute("class",h.summaryItemClass);typeof h.summaryItemStyle!==c&&j.setAttribute("style",h.summaryItemStyle)}else if(d.isMilestone){typeof h.milestoneItemClass!==c&&j.setAttribute("class",h.milestoneItemClass);typeof h.milestoneItemStyle!==c&&j.setAttribute("style",h.milestoneItemStyle)}else{typeof h.standardItemClass!==c&&j.setAttribute("class", +h.standardItemClass);typeof h.standardItemStyle!==c&&j.setAttribute("style",h.standardItemStyle)}}var j=[],n=null;try{n=m.activeElement}catch(w){}for(;n!=null&&n!=d.gridItem;){j.push(n);n=n.parentNode}for(var u=-1,n=a.childNodes.length;n-- >0;)if(j.indexOf(a.childNodes[n])>=0){u=n;break}for(n=a.childNodes.length;n-- >0;)a.removeChild(a.childNodes[n]);for(n=0;n=0&&setTimeout(function(){try{for(var b=a.childNodes[u];b.nodeName!= +"input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(d){}},0)};if(d.wasGridItemContentLoaded)setTimeout(j,0);else{j();d.wasGridItemContentLoaded=true}}},Na=function(a){if(typeof a.isWaitingToRefreshGridItem===c){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!==c&&Aa(a.gridItem,a,a.ganttChartView.items, +a.ganttChartView.settings.columns,a.ganttChartView.chartContent,a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings);delete a.isWaitingToRefreshGridItem},0)}},Mc=function(a,d,e,b,g,f,h){var m=d.ganttChartView.ownerDocument;(!h.isVirtualizing||typeof d.isVirtuallyVisible!==c&&d.isVirtuallyVisible)&&setTimeout(function(){if(typeof d.gridItemSelectionContainer!==c){var j=d.gridItemSelectionContainer;typeof h.selectedItemClass!==c&&j.setAttribute("class",d.isSelected?h.selectedItemClass: +null);typeof h.selectedItemStyle!==c&&j.setAttribute("style",d.isSelected?h.selectedItemStyle:null)}var j=[],l=null;try{l=m.activeElement}catch(n){}for(;l!=null&&l!=d.gridItem;){j.push(l);l=l.parentNode}for(var w=-1,l=a.childNodes.length;l-- >0;)if(a.childNodes[l].isSelection&&j.indexOf(a.childNodes[l])>=0){w=l;break}for(l=a.childNodes.length;l-- >0;)a.childNodes[l].isSelection&&a.removeChild(a.childNodes[l]);for(l=0;l=0&&setTimeout(function(){try{for(var b=a.childNodes[w];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(d){}},0)},0)},Rb=function(a){typeof a.gridItem!==c&&Mc(a.gridItem,a,a.ganttChartView.items,a.ganttChartView.settings.columns,a.ganttChartView.chartContent, +a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings)},Vb=function(a,d,e,b,g,f){var h=a.ganttChartView.ownerDocument,m=h.createElement("div"),j=0;e.isTreeView==true&&(j=f.indentationLevelWidth*a.indentation);m.setAttribute("style","overflow: hidden; vertical-align: middle; display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin: 0px; padding: 0px; width: "+e.width+"px; height: "+f.itemHeight+"px; padding-left: "+j+"px"); +var l=h.createElement("div");typeof e.cellClass!==c?l.setAttribute("class",e.cellClass):typeof f.cellClass!==c&&l.setAttribute("class",f.cellClass);typeof e.cellStyle!==c?l.setAttribute("style",e.cellStyle):typeof f.cellStyle!==c&&l.setAttribute("style",f.cellStyle);var n=h.createElement("div");n.setAttribute("style","white-space: nowrap; overflow: hidden; margin: 0px; padding: 0px; width: "+(e.width-j-16)+"px");if(e.isTreeView==true){j=h.createElement("div");j.setAttribute("style","display: inline-block; width: "+ +g+"px");if(a.hasChildren){g=h.createElement("div");g.setAttribute("style","cursor: default; padding-left: 1px; font-size: 12px; display: inline-block");h=f.collapsedToggleButtonTemplate;if(a.isExpanded)h=f.expandedToggleButtonTemplate;h=h();g.appendChild(h);Wb(g,a,d,h,b,null,null,f);j.appendChild(g)}n.appendChild(j)}a=e.cellTemplate(a);n.appendChild(a);l.appendChild(n);m.appendChild(l);m.isSelection=e.isSelection;return m},Cb=function(a,d){return function(){var e=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg", +"polygon");e.setAttribute("points","3.5,2.5 3.5,11.5 10.5,6.5");return s(e,d)}},Db=function(a,d){return function(){var e=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");e.setAttribute("points","2.5,3.5 11.5,3.5 6.5,10.5");return s(e,d)}},Wb=function(a,d,e,b,g,f,h,m){if(typeof f===c||f==null)f=b.querySelector("#PART_Button");f!=null&&Xb(f,f,m);if(typeof h===c||h==null)h=b.querySelector("#PART_Border");h!=null&&Xb(h,f,m);e={toggleButton:a,item:d,items:e,content:b,chartContent:g, +settings:m};if(f!=null){f.tag=e;(typeof m.isExport===c||!m.isExport)&&f.addEventListener("mouseup",ob,true)}if(h!=null){h.tag=e;(typeof m.isExport===c||!m.isExport)&&h.addEventListener("mouseup",ob,true)}a.tag=e;f==null&&(h==null&&(typeof m.isExport===c||!m.isExport))&&a.addEventListener("mouseup",ob,true);b.addEventListener("keypress",function(a){if(a.keyCode==32){a.preventDefault();a.stopPropagation();ga(d,!d.isExpanded,true)}},true);d.toggleButton=a},Xb=function(a,d,e){if(!(typeof e.isExport!== +c&&e.isExport)){a.addEventListener("mouseover",function(){typeof e.toggleButtonHoveringClass!==c&&d.setAttribute("class",e.toggleButtonHoveringClass);typeof e.toggleButtonHoveringStyle!==c&&d.setAttribute("style",e.toggleButtonHoveringStyle)},true);a.addEventListener("mouseout",function(){d.setAttribute("class",e.toggleButtonClass);d.setAttribute("style",e.toggleButtonStyle)},true)}},ob=function(a){a.stopPropagation();a=a.target.tag.item;ga(a,!a.isExpanded,true)},ga=function(a,d,e,b){if(a.isExpanded!= +d){a.isExpanded=d;(typeof b===c||b)&&y(a,"isExpanded",e,true);Yb(a)}},Yb=function(a,d){if(typeof a.toggleButton===c)(typeof d===c||d)&&setTimeout(function(){Yb(a,false)},0);else{var e=a.toggleButton,b=e.tag,g=b.settings,f=g.expandedToggleButtonTemplate,h=g.collapsedToggleButtonTemplate;a.isExpanded&&(h=f);var f=h(),h=f.querySelector("#PART_Button"),m=f.querySelector("#PART_Border");e.replaceChild(f,b.content);b.content=f;var j=b.items,b=b.chartContent;Wb(e,a,j,f,b,h,m,g);a.isVisible&&!(typeof a.isHidden!== +c&&a.isHidden)&&Nc(j,a,b,g);na(a);Ma(j,b,g);e=a.scheduleChartView;if(typeof e!==c)for(g=a.scheduleChartIndex;g0&&u.indexOf(w)<0){u.push(w);for(t=0;t0)for(f=0;f0){b=true;for(h=0;h0;)a.removeChild(a.childNodes[b]);if(!(e.isVirtualizing&&(typeof d.isVirtuallyVisible===c||!d.isVirtuallyVisible)||typeof d.isBarVisible!==c&&!d.isBarVisible)){b=e.standardTaskTemplate;if(typeof d.standardTaskTemplate!==c)b=d.standardTaskTemplate;if(d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)){b=e.summaryTaskTemplate;if(typeof d.summaryTaskTemplate!==c)b=d.summaryTaskTemplate}else if(d.isMilestone){b= +e.milestoneTaskTemplate;if(typeof d.milestoneTaskTemplate!==c)b=d.milestoneTaskTemplate}if(typeof d.taskTemplate!==c)b=d.taskTemplate;if(typeof e.internalPreTaskTemplate!==c){var g=e.internalPreTaskTemplate(d);g!=null&&a.appendChild(g)}b=b(d);b.addEventListener("contextmenu",function(a){typeof e.itemContextMenuHandler!==c?e.itemContextMenuHandler(a,d):a.preventDefault()},false);a.appendChild(b);if(typeof e.internalExtraTaskTemplate!==c){g=e.internalExtraTaskTemplate(d);g!=null&&a.appendChild(g)}if(typeof e.extraTaskTemplate!== +c){g=e.extraTaskTemplate(d);g!=null&&a.appendChild(g)}if(e.areTaskAssignmentsVisible){g=e.assignmentsTemplate(d);b.appendChild(g)}if(e.isTaskToolTipVisible){g=e.itemTemplate;if(typeof d.template!==c)g=d.template;b.appendChild(g(d))}if(e.areTaskDependenciesVisible&&typeof d.predecessors!==c)for(b=0;b=0&&Y(d[e]);Y(a);e=a.index+1;e0&&b[a-1].isPart;)a--;for(var f=0;f=0){d.isPart=true;d.ganttChartItem=b[f];break}var h=a0?b[a-1]:null;h=h!=null?h.indentation+1:0;if(d.indentation>h)d.indentation=h}else if(typeof d.indentation===c||d.indentationh.indentation)d.indentation= +h.indentation;M([d],g);b.splice(a,0,d);ca(b,e);if(typeof d.parts!==c){if(typeof d.isGroup===c){d.isGroup=true;d.isSummaryEnabled=false}M(d.parts,g);if(d.isGroup||typeof d.isBarVisible===c)d.isBarVisible=false;for(f=0;f= +0||b.splice(b.length,0,m)}}Ha(b,g,e);var j;if(g.isGridVisible&&!d.isPart&&typeof d.displayRowIndex===c){f=null;if(a0){for(f=e[g-1];f.parent!=null;)f=f.parent;h=f.isExpanded;a.hasChildren&&ga(f,a.isExpanded,false,true);f.indentation>=a.indentation&&(f=null)}else e[0].isExpanded||ga(e[0],true,false,true);var m=g+1a.indentation)&&ga(m,true,false,true);var j=m!=null?m.indentation:null,l,n,w;for(n=0;n0;)if(l.predecessors[w].item==a){l.predecessors.splice(w,1);y(l,"predecessors",false,true);ma(l);qa(l)}}var u=a.itemTop;e.splice(g,1);ca(e,d);Ha(e,b,d);b.isGridVisible&&typeof a.displayRowIndex===c&&typeof a.gridItemContainer!==c&&d.gridContent.removeChild(a.gridItemContainer);n=d.chartContent.chartArea; +typeof a.chartItem!==c&&n.removeChild(a.chartItem);m=g=e.length&&(g=e.length-1);if(g>=0){for(n=0;n0){g.appendChild(b.createTextNode("\n")); +for(var e="",f=0;f0&&(e=e+", ");e=e+h.item.content;h.dependencyType&&(e=e+(" ("+ac(h.dependencyType)+")"))}}g.appendChild(b.createTextNode("Predecessors: "+e))}}else if(!isNaN(d.units)){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return g}},Kb=function(a){return function(d){var e=d.ganttChartView,b=typeof a!==c?a:e.settings,e=e.ownerDocument,g=e.createElementNS("http://www.w3.org/2000/svg", +"text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled))f=f+b.barHeight/2;g.setAttribute("x",f+7);g.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d===c&&(d="");g.appendChild(e.createTextNode(d));typeof b.assignmentsClass!==c?g.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!==c&&g.setAttribute("style",b.assignmentsStyle);return g}},pb=function(a){var d=a.ganttChartView.ownerDocument; +if(typeof a.chartItemArea===c)a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Gb=function(a,d,e){return function(b){var g=typeof d!==c?d:b.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,j=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!==c&&typeof b.baselineFinish!==c){var l=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),l+4),w=m.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",l);w.setAttribute("y",f.barMargin/2);w.setAttribute("width",Math.max(0,n-l-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);l=f.baselineBarClass;if(typeof b.baselineBarClass!==c)l=b.baselineBarClass;if(typeof l!==c)w.setAttribute("class",l);else{l=f.baselineBarStyle;if(typeof b.baselineBarStyle!==c)l=b.baselineBarStyle;typeof l!==c&&w.setAttribute("style", +l)}j.appendChild(w)}var w=H(b.start,f),l=Math.max(H(b.finish,f),w+4),n=H(b.completedFinish,f),u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",w);u.setAttribute("y",f.barMargin);u.setAttribute("width",Math.max(0,l-w-1));u.setAttribute("height",f.barHeight);u.setAttribute("rx",f.barCornerRadius);u.setAttribute("ry",f.barCornerRadius);var t=f.standardBarClass;if(typeof b.standardBarClass!==c)t=b.standardBarClass;if(typeof b.barClass!==c)t=b.barClass;if(typeof t!==c)u.setAttribute("class", +t);else{t=f.standardBarStyle;if(typeof b.standardBarStyle!==c)t=b.standardBarStyle;if(typeof b.barStyle!==c)t=b.barStyle;typeof t!==c&&u.setAttribute("style",t)}j.appendChild(u);if(f.isTaskCompletedEffortVisible){u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",w);u.setAttribute("y",f.barMargin+f.completedBarMargin);u.setAttribute("width",Math.max(0,n-w-1));u.setAttribute("height",f.completedBarHeight);u.setAttribute("rx",f.completedBarCornerRadius);u.setAttribute("ry", +f.completedBarCornerRadius);t=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!==c)t=b.standardCompletedBarClass;if(typeof b.completedBarClass!==c)t=b.completedBarClass;if(typeof t!==c)u.setAttribute("class",t);else{t=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!==c)t=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!==c)t=b.completedBarStyle;typeof t!==c&&u.setAttribute("style",t)}j.appendChild(u)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly=== +c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)){u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",w);u.setAttribute("y",f.barMargin);u.setAttribute("width",Math.max(0,l-w-1));u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");f.isTaskStartReadOnly||j.appendChild(u);t=m.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",w-4);t.setAttribute("y",f.barMargin);t.setAttribute("width", +4);t.setAttribute("height",f.barHeight);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: w-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&j.appendChild(t);var o=m.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x",l-4);o.setAttribute("y",f.barMargin);o.setAttribute("width",8);o.setAttribute("height",f.barHeight);o.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!= +"TouchEnabled"&&j.appendChild(o);var p=m.createElementNS("http://www.w3.org/2000/svg","rect");p.setAttribute("x",n-2);p.setAttribute("y",f.barMargin);p.setAttribute("width",6);p.setAttribute("height",f.barHeight);p.setAttribute("style","fill: White; fill-opacity: 0; cursor: ew-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){j.appendChild(p);var k=m.createElementNS("http://www.w3.org/2000/svg","title"),F=typeof f.areToolTipsSimplified===c||!f.areToolTipsSimplified? +g.getItemCompletion(b):NaN;k.appendChild(Q(m,!isNaN(F)?Math.round(F*1E4)/100+"%":""));p.appendChild(k)}qb(u,t,o,p,b,w,l,n,h,g,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies===c||f.allowCreatingStartDependencies){n=m.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",w);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer"); +j.appendChild(n)}m=m.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx",l-2);m.setAttribute("cy",f.barMargin+f.barHeight/2);m.setAttribute("r",f.barHeight/4);m.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(m);ab(m,n,j,b,f.barMargin+f.barHeight/2,l-2,w,h,g,f)}}return j}},Hb=function(a,d,e){return function(b){var g=typeof d!==c?d:b.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,j=pb(b),l=H(b.start,f), +n=H(b.finish,f),w=f.barHeight*2.15/3,u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l);u.setAttribute("y",f.barMargin);u.setAttribute("width",Math.max(0,n-l-1));u.setAttribute("height",w);var t=f.summaryBarClass;if(typeof b.summaryBarClass!==c)t=b.summaryBarClass;if(typeof b.barClass!==c)t=b.barClass;if(typeof t!==c)u.setAttribute("class",t);else{var o=f.summaryBarStyle;if(typeof b.summaryBarStyle!==c)o=b.summaryBarStyle;if(typeof b.barStyle!==c)o=b.barStyle;typeof o!== +c&&u.setAttribute("style",o)}j.appendChild(u);if(f.isTaskCompletedEffortVisible&&f.isSummaryTaskCompletedEffortVisible){u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l);u.setAttribute("y",f.barMargin+f.completedBarMargin*2.15/3);u.setAttribute("width",Math.max(0,n-l-1)*g.getItemCompletion(b));u.setAttribute("height",f.completedBarHeight*2.15/3);u.setAttribute("rx",f.completedBarCornerRadius);u.setAttribute("ry",f.completedBarCornerRadius);var p=f.summaryCompletedBarClass; +if(typeof b.summaryCompletedBarClass!==c)p=b.summaryCompletedBarClass;if(typeof b.completedBarClass!==c)p=b.completedBarClass;if(typeof p!==c)u.setAttribute("class",p);else{p=f.summaryCompletedBarStyle;if(typeof b.summaryCompletedBarStyle!==c)p=b.summaryCompletedBarStyle;if(typeof b.completedBarStyle!==c)p=b.completedBarStyle;typeof p!==c&&u.setAttribute("style",p)}j.appendChild(u)}if(!b.isExpanded){u=m.createElementNS("http://www.w3.org/2000/svg","line");u.setAttribute("x1",l);u.setAttribute("y1", +f.barMargin+w+2.5);u.setAttribute("x2",n-1);u.setAttribute("y2",f.barMargin+w+2.5);p=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!==c)p=b.collapsedSummaryLineClass;if(typeof p!==c)u.setAttribute("class",p);else{p=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!==c)p=b.collapsedSummaryLineStyle;typeof p!==c&&u.setAttribute("style",p)}j.appendChild(u)}var p=m.createElementNS("http://www.w3.org/2000/svg","polygon"),u=f.barMargin-0.25,k=w+1.5,F=f.barHeight*3/4,s= +f.barHeight/4,w=l-1-f.barHeight/3;p.setAttribute("points",w+","+u+" "+w+","+(u+k)+" "+(w+F/2)+","+(u+k+s)+" "+(w+F)+","+(u+k)+" "+(w+F)+","+u);typeof t!==c&&p.setAttribute("class",t);typeof o!==c&&p.setAttribute("style",o);j.appendChild(p);p=m.createElementNS("http://www.w3.org/2000/svg","polygon");w=n+f.barHeight/3;p.setAttribute("points",w+","+u+" "+w+","+(u+k)+" "+(w-F/2)+","+(u+k+s)+" "+(w-F)+","+(u+k)+" "+(w-F)+","+u);typeof t!==c&&p.setAttribute("class",t);typeof o!==c&&p.setAttribute("style", +o);j.appendChild(p);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){t=null;if(typeof f.allowCreatingStartDependencies===c||f.allowCreatingStartDependencies){t=m.createElementNS("http://www.w3.org/2000/svg","circle");t.setAttribute("cx",l-0.5);t.setAttribute("cy",f.barMargin+f.barHeight/2);t.setAttribute("r",f.barHeight/4);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer"); +j.appendChild(t)}m=m.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx",n-0.5);m.setAttribute("cy",f.barMargin+f.barHeight/2);m.setAttribute("r",2.5);m.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(m);ab(m,t,j,b,f.barMargin+f.barHeight/2,n-1.5,l,h,g,f)}return j}},Ib=function(a,d,e){return function(b){var g=typeof d!==c?d:b.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,j=pb(b);if(f.isBaselineVisible&& +typeof b.baselineStart!==c){var l=H(b.baselineStart,f),n=m.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-1,u=f.barHeight+1;n.setAttribute("points",l+","+w+" "+(l-u/2)+","+(w+u/2)+" "+l+","+(w+u)+" "+(l+u/2)+","+(w+u/2));l=f.baselineBarClass;if(typeof b.baselineBarClass!==c)l=b.baselineBarClass;if(typeof l!==c)n.setAttribute("class",l);else{var t=f.baselineBarStyle;if(typeof b.baselineBarStyle!==c)t=b.baselineBarStyle}n.setAttribute("style",t);j.appendChild(n)}n=H(b.start,f); +t=m.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;w=f.barMargin;l=f.barHeight+1;t.setAttribute("points",n+","+w+" "+(n-l/2)+","+(w+l/2)+" "+n+","+(w+l)+" "+(n+l/2)+","+(w+l/2));w=f.milestoneBarClass;if(typeof b.milestoneBarClass!==c)w=b.milestoneBarClass;if(typeof b.barClass!==c)w=b.barClass;if(typeof w!==c)t.setAttribute("class",w);else{w=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!==c)w=b.milestoneBarStyle;if(typeof b.barStyle!==c)w=b.barStyle;typeof w!==c&&t.setAttribute("style", +w)}j.appendChild(t);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)){t=m.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",n-l/2);t.setAttribute("y",f.barMargin);t.setAttribute("width",l);t.setAttribute("height",l);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(t);qb(t,null,null,null,b,n,n,n,h,g,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& +!b.isPart){m=m.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx",n);m.setAttribute("cy",f.barMargin+f.barHeight/2);m.setAttribute("r",f.barHeight/4);m.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(m);ab(m,null,j,b,f.barMargin+f.barHeight/2,n,n,h,g,f)}}return j}},Lb=function(a,d){return function(e,b){var g=e.ganttChartView,f=typeof d!==c?d:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,g=m.createElementNS("http://www.w3.org/2000/svg", +"g"),j;j=za(b.item,h,f);var l=za(e,h,f),h="M ",n,w,u=f.itemHeight,t=u/2,o=u/3.5,p=2,k=false,F;if(j==l&&(typeof b.dependencyType===c||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType===c||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);w=H(e.start,f)}else{n=H(b.item.start,f);w=H(e.finish,f)}j=j-l+0.5;h=h+(n+" "+(j+t)+" L "+(w+(w>n?-1:1)*(u/5-1))+" "+(j+t))}else{if(typeof b.dependencyType!== +c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled===c||b.item.isSummaryEnabled)?n=n-(f.barHeight/3+0.25):b.item.isMilestone&&(n=n-u/4);w=n-o}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled===c||b.item.isSummaryEnabled))n=n+(f.barHeight/3+0.25);else if(b.item.isMilestone)n=n+u/4;else{F=H(b.item.start,f)+4-1;no*2&&e.start>=b.item.finish)&&(l=w)}}if(typeof b.dependencyType!==c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"|| +b.dependencyType=="SF")){if(l>w){j=j-o/6;j=j<=0?j+t:j-t;h=h+(" "+w+" "+(j+t))}}else if(ln-p&&(p=-p);n=n-p}h=h+(" "+l+" "+j);k&&(h=h+(" "+n+" "+j))}j=h;h=m.createElementNS("http://www.w3.org/2000/svg","path");h.setAttribute("d",j);typeof f.dependencyLineZoneClass!==c&&h.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!==c&&h.setAttribute("style", +f.dependencyLineZoneStyle);g.appendChild(h);m=m.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",j);j=f.dependencyLineClass;if(typeof b.dependencyLineClass!==c)j=b.dependencyLineClass;if(typeof j!==c)m.setAttribute("class",j);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!==c)f=b.dependencyLineStyle;typeof f!==c&&m.setAttribute("style",f)}g.appendChild(m);return g}},Mb=function(a){return function(d,e){var b=d.ganttChartView.ownerDocument,g=b.createElementNS("http://www.w3.org/2000/svg", +"title");g.appendChild(Q(b,e.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified===c||!a.areToolTipsSimplified){if(e.dependencyType){g.appendChild(b.createTextNode("\n"));g.appendChild(Q(b,"Type: "+ac(e.dependencyType)))}if(e.lag){g.appendChild(b.createTextNode("\n"));g.appendChild(Q(b,"Lag: "+e.lag/36E5+"h"))}}return g}},ac=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}}, +y=function(a,d,e,b){if(typeof a.ganttChartView!==c){var g=a.ganttChartView,f=g.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!==c&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem===c)a.start=R(a.start,f,true,typeof a.isMilestone!==c&&a.isMilestone,D(a));if(e)a.preferredStart= +a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!==c&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem===c)a.finish=R(a.finish,f,typeof a.isMilestone!==c&&a.isMilestone,true,D(a))}else if(typeof a.minFinish!== +c&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(g.isTimingInformationInitialized){var h=g.items,m,j;if(d=="indentation"||d=="predecessors")for(m=0;m< +h.length;m++){j=h[m];typeof j.dependsOf!==c&&delete j.dependsOf}if((d=="predecessors"||d=="start"||d=="finish")&&typeof a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring===c&&f.areTaskDependencyConstraintsEnabled&&(f.areTaskDependencyConstraintsEnabledWhileDragging||typeof g.isDuringTimeDragOperation===c)){a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring=true;for(j=a.parent;j!=null;){typeof j.predecessors!==c&&j.predecessors.length>0&&Ka(j,h,f,g);j=j.parent}j=a;for(typeof j.predecessors!== +c&&j.predecessors.length>0?Ka(j,h,f,g):rb(j,f);j!=null;){if(typeof j.successors===c){j.successors=[];for(m=0;m0&&(j=j+", ");n=Math.floor(l.value/h*1E6)/1E6;j=j+(l.key+(n!=1?" ["+n*100+"%]":""))}g.setItemAssignmentsContent(a,j)}f.itemPropertyChangeHandler(a,d,e,b);d=="isExpanded"?typeof a.ganttChartView!==c&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!== +c&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!==c&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!==c&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,e);typeof a.scheduleChartView!==c&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates===c)if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var e=0;ef&&(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))){a.finish= +R(oa(f,b),b,a.isMilestone,true,D(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}e=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!==c&&d.lag!=0&&(f=S(f,d.lag,b,D(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled=== +c||a.isSummaryEnabled))){a.finish=R(oa(f,b),b,a.isMilestone,true,D(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}e=true}}if(e&&!(typeof a.ganttChartView===c||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!==c))if(typeof a.ganttChartView!==c&&!a.ganttChartView.isTimingInformationInitialized)Y(a); +else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Y(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Ra=function(a,d){if(typeof a.dependsOf!==c&&typeof a.dependsOf[a]!==c)return a.dependsOf[d];try{if(a==d)return true;var e=cc(a);if(e.indexOf(d)>=0)return true;var b=cc(d);if(b.indexOf(a)>=0)return true;var g=sb(a),f,h;for(f=0;f=0||b.indexOf(h)>=0||Ra(h,d))return true}for(g=0;g=0||b.indexOf(h)>=0||Ra(h,d))return true}}var j=a.children;for(f=0;f0&&Ra(l,d))return true}}finally{if(typeof a.dependsOf===c)a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},cc=function(a){for(var d=[];typeof a.parent!==c&&a.parent!=null;){(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d= +[];if(typeof a.predecessors!==c&&a.predecessors!=null)for(var e=0;eh||!b&&a==h)if(b)a=h;else{g=$(g);a=f}for(b=la(g);bj||Tb(g,d);){if(e){b++;g=$(g); +a=f}else{b--;g=La(g);a=h}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(g.valueOf()+a)},O=function(a,d,e,b){if(d.valueOf()=f){j=$(j);a=g}for(var l=X(d);j=h&&(n<=m&&!Tb(j,b))&&(e=e+(f-a));j=$(j);a=g}d=ja(d);df&&(d=f);d>a&&(e=e+(d-a));return e},S=function(a,d,e,b){if(d<0)return Sa(-d,a,e,b);a=R(a,e,true,false,b);if(d==0)return a;var g=typeof b!==c&&typeof b.workingDayStart!==c?b.workingDayStart:e.visibleDayStart,f=typeof b!==c&&typeof b.workingDayFinish!== +c?b.workingDayFinish:e.visibleDayFinish,h=ja(a);if(h+d0;){a=ja(a)>0?R($(X(a)),e,true,false,b):R(X(a),e,true,false,b);if(g+dg)return new Date(d.valueOf()-a);h=h-g;d=new Date(d.valueOf()-h);for(a=a-h;a>0;){d=ja(d)<864E5?R(X(d),e,false,true,b):R(La(X(d)),e,false,true,b);if(f-a>g)return new Date(d.valueOf()-a);h=f-g;d=new Date(d.valueOf()-h);a=a-h}return new Date(d.valueOf())},bb=function(a,d,e,b,c){return O(a,d,b,c)/O(a,e,b,c)},ec=function(a,d,e,b,c){return S(a,d*O(a,e,b,c),b,c)},Ta=function(a){for(var d=0,a=fa(a),e=0;ee){b=f.key;e=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=indexOfKey(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,e,b,g,f,h,m,j,l,n){function w(b,d){l.isDuringTimeDragOperation=true;l.draggingItem=g;l.dragType="Start";l.style.cursor=a.style.cursor;l.draggingInitialX=b.clientX;l.draggingInitialStartPosition= +f;l.draggingInitialFinishPosition=h;l.draggingInitialCompletedFinishPosition=m;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!d){(u=DlhSoft.Controls.ToolTip.get(a))||(u=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +u.setContent(n.dateTimeFormatter(x(g.start))+" \u2013 "+n.dateTimeFormatter(x(g.finish)));u.show();u.originalX=u.x;l.toolTip=u}}var u;a.addEventListener("mousedown",function(a){if(a.button==0){w(a);a.preventDefault()}},true);a.addEventListener("touchstart",function(a){w(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend",g.touchEndHandler)},true);if(d!=null){var t=function(b,e){l.isDuringTimeDragOperation=true;l.draggingItem= +g;l.dragType="StartOnly";l.style.cursor=a.style.cursor;l.draggingInitialX=b.clientX;l.draggingInitialStartPosition=f;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!e){(u=DlhSoft.Controls.ToolTip.get(d))||(u=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));u.setContent(n.dateTimeFormatter(x(g.start))+" \u2013");u.show();u.setHorizontalPosition(u.x+4);u.originalX=u.x;l.toolTip=u}};d.addEventListener("mousedown",function(a){if(a.button==0){t(a);a.preventDefault()}},true);d.addEventListener("touchstart",function(a){t(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend", +g.touchEndHandler)},true)}if(e!=null){var o=function(a,b){l.isDuringTimeDragOperation=true;l.draggingItem=g;l.dragType="Finish";l.style.cursor=e.style.cursor;l.draggingInitialX=a.clientX;l.draggingInitialFinishPosition=h;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!b){(u=DlhSoft.Controls.ToolTip.get(e))||(u=DlhSoft.Controls.ToolTip.initialize(void 0,e,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));u.setContent("\u2013 "+n.dateTimeFormatter(x(g.finish)));u.show();u.setHorizontalPosition(u.x-u.contentContainer.clientWidth);u.originalX=u.x;l.toolTip=u}};e.addEventListener("mousedown",function(a){if(a.button==0){o(a);a.preventDefault()}}, +true);e.addEventListener("touchstart",function(a){o(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend",g.touchEndHandler)},true)}if(b!=null){var p=function(a,d){l.isDuringTimeDragOperation=true;l.draggingItem=g;l.dragType="CompletedFinish";l.style.cursor=b.style.cursor;l.draggingInitialX=a.clientX;l.draggingInitialCompletedFinishPosition=m;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!d){(u=DlhSoft.Controls.ToolTip.get(b))|| +(u=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));var e=bb(g.start,g.completedFinish, +g.finish,n,D(g));if(!isNaN(e)){u.setContent(Math.round(e*1E4)/100+"%");u.show();u.setHorizontalPosition(u.x+2);u.originalX=u.x;l.toolTip=u}}};b.addEventListener("mousedown",function(a){if(a.button==0){p(a);a.preventDefault()}},true);b.addEventListener("touchstart",function(a){p(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend",g.touchEndHandler)},true)}if(typeof l.draggableItems===c)l.draggableItems=[];for(var k=false, +F=0;Fg.finish)d=g.finish;g.start=d;g.preferredStart=g.start;y(g,"start",true,false);if(l.dragType!="StartOnly"){if(g.isMilestone){g.finish=g.start;y(g,"finish",false,false);g.completedFinish=g.start}else{g.finish=S(g.start,e,n,D(g));y(g,"finish",false,false);g.completedFinish=S(g.start,m,n,D(g))}y(g,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&& +n.useUpdatingToolTips&&!b){u=l.toolTip;u.setContent(n.dateTimeFormatter(x(g.start))+" \u2013 "+n.dateTimeFormatter(x(g.finish)));u.setHorizontalPosition(u.originalX+(H(g.start,n)-l.draggingInitialStartPosition))}}else{if(g.finishe){g.completedFinish=e;y(g,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!b){u=l.toolTip;u.setContent("\u2013 "+n.dateTimeFormatter(x(g.finish))); +u.setHorizontalPosition(u.originalX+(H(g.finish,n)-l.draggingInitialFinishPosition))}Ua(g,j,l.chartContent,n)}else if(l.dragType=="CompletedFinish"){e=R(oa(Ca(l.draggingInitialCompletedFinishPosition+d,n),n),n,g.isMilestone,true,D(g));if(eg.finish)e=g.finish;if(e.valueOf()!=g.completedFinish.valueOf()){g.completedFinish=e;y(g,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!b){u=l.toolTip;e=bb(g.start,g.completedFinish,g.finish,n,D(g));if(!isNaN(e)){u.setContent(Math.round(e* +1E4)/100+"%");u.setHorizontalPosition(u.originalX+(H(g.completedFinish,n)-l.draggingInitialCompletedFinishPosition))}}Ua(g,j,l.chartContent,n)}l.draggingItem=g;l.draggingPerformed=true}};l.addEventListener("mousemove",function(a){s(a)},true);l.addEventListener("touchmove",function(a){s(a.touches[0],true)},true);g.touchMoveHandler=function(a){s(a.touches[0],true)};var r=function(){if(!(typeof l.draggingItem===c||l.draggingItem!=g||l.dragType!="Start"&&l.dragType!="StartOnly"&&l.dragType!="Finish"&& +l.dragType!="CompletedFinish")){delete l.isDuringTimeDragOperation;var a=l.draggingItem;l.style.cursor="default";if(l.draggingPerformed){if(l.dragType=="Start"||l.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(l.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else l.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete l.draggingPerformed}delete l.draggingItem}};document.addEventListener("mouseup", +function(a){a.button==0&&r()},true);document.addEventListener("touchend",function(){r()},true);g.touchEndHandler=function(){r()};l.draggableItems.push(g)}},ab=function(a,d,e,b,g,f,h,m,j,l){function n(d,e){delete j.cancelDrag;j.draggingItem=b;j.dragType="Dependency";j.dragDependencyType="Finish";j.style.cursor=a.style.cursor;j.draggingInitialX=d.clientX;j.draggingInitialY=d.clientY;j.draggingInitialRightPosition=f;j.draggingInitialTopPosition=g;j.draggingInitialFinishPosition=f;j.draggingInitialThumbPosition= +g;if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!e){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;j.toolTip=toolTip}}var w=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(a){if(a.button==0){n(a);a.preventDefault()}},true);a.addEventListener("touchstart",function(a){n(a.touches[0],true);a.preventDefault()},true);if(d!=null){var u=function(e,c){delete j.cancelDrag;j.draggingItem=b;j.dragType="Dependency";j.dragDependencyType= +"Start";j.style.cursor=a.style.cursor;j.draggingInitialX=e.clientX;j.draggingInitialY=e.clientY;j.draggingInitialRightPosition=h;j.draggingInitialTopPosition=g;j.draggingInitialFinishPosition=h;j.draggingInitialThumbPosition=g;e.preventDefault();if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!c){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;j.toolTip=toolTip}};d.addEventListener("mousedown",function(a){if(a.button==0){u(a); +a.preventDefault()}},true);d.addEventListener("touchstart",function(a){u(a.touches[0],true);a.preventDefault()},true)}a.addEventListener("mouseover",function(){if(typeof j.temporaryHoveringThumb!==c){var b=j.temporaryHoveringThumb;delete j.temporaryHoveringThumb;if(typeof b.originalStyle===c)return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof j.temporaryDependencyLine===c){a.mouseOver=true;j.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof l.dependencyPointerClass!== +c&&a.setAttribute("class",l.dependencyPointerClass);typeof l.dependencyPointerStyle!==c&&a.setAttribute("style",l.dependencyPointerStyle);a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof j.temporaryHoveringThumb!==c){var a=j.temporaryHoveringThumb;delete j.temporaryHoveringThumb;if(typeof a.originalStyle===c)return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof j.temporaryDependencyLine===c){d.mouseOver=true;j.temporaryHoveringThumb= +d;d.originalStyle=d.getAttribute("style");typeof l.dependencyPointerClass!==c&&d.setAttribute("class",l.dependencyPointerClass);typeof l.dependencyPointerStyle!==c&&d.setAttribute("style",l.dependencyPointerStyle);d.style.cursor="pointer"}},true);a.addEventListener("mouseout",function(){delete a.mouseOver;setTimeout(function(){if(!(typeof a.originalStyle===c||a.mouseOver)){a.setAttribute("style",a.originalStyle);delete a.originalStyle}},250)},true);d!=null&&d.addEventListener("mouseout",function(){delete d.mouseOver; +setTimeout(function(){if(!(typeof d.originalStyle===c||d.mouseOver)){d.setAttribute("style",d.originalStyle);delete d.originalStyle}},250)},true);if(typeof j.draggableDependencyItems===c)j.draggableDependencyItems=[];for(var t=false,o=0;oo||mb(h,b)||Da(h,b)||Da(b,h))h=null;if(h!=null&&(typeof l.allowCreatingToFinishDependencies===c||l.allowCreatingToFinishDependencies)&& +!h.isMilestone&&u>t+(o-t)*3/4)p="Finish"}toolTip.setContent(b.content+" \u2013"+(h!=null?" "+h.content+(p!="Finish"?"":" \u2022"):""));toolTip.setPosition(toolTip.originalX+f,toolTip.originalY+g)}}}};j.addEventListener("mousemove",function(a){p(a)},true);j.addEventListener("touchmove",function(a){p(a.touches[0],true)},true);var k=function(a){if(!(typeof j.draggingItem===c||j.draggingItem!=b||j.dragType!="Dependency")){if(typeof j.temporaryDependencyLine!==c){try{e.removeChild(j.temporaryDependencyLine)}catch(d){}delete j.temporaryDependencyLine}for(var f= +Math.floor((b.itemTop+j.draggingInitialThumbPosition+(a.clientY-j.draggingInitialY))/l.itemHeight),g=null,n=0,h=0;h= +f&&a<=n&&!mb(g,b)&&!Da(g,b)&&!Da(b,g)){a=g==null||typeof l.allowCreatingToFinishDependencies!==c&&!l.allowCreatingToFinishDependencies||g.isMilestone||a<=f+(n-f)*3/4?"Start":"Finish";delete b.successors;if(typeof g.predecessors===c)g.predecessors=[];f={item:b};if(j.dragDependencyType!="Start"){if(a=="Finish")f.dependencyType="FF"}else f.dependencyType=a!="Finish"?"SS":"SF";g.predecessors.push(f);y(g,"predecessors",true,true);if(g.start=d.gridContentContainer.offsetWidth+d.chartContentContainer.clientWidth-24){e=d.chartContentContainer.scrollLeft;d.chartContentContainer.scrollLeft=d.chartContentContainer.scrollLeft+20;e=d.chartContentContainer.scrollLeft-e;if(typeof d.draggingInitialStartPosition!==c)d.draggingInitialStartPosition=d.draggingInitialStartPosition+e;if(typeof d.draggingInitialFinishPosition!==c)d.draggingInitialFinishPosition=d.draggingInitialFinishPosition+e;if(typeof d.draggingInitialCompletedFinishPosition!== +c)d.draggingInitialCompletedFinishPosition=d.draggingInitialCompletedFinishPosition+e}}},Oc=function(a){var d=0;if(a.offsetParent){do{d=d+a.offsetTop;a=a.offsetParent}while(a)}return d},gc=function(a,d){if(typeof d.draggingItem!==c){var a=a-Oc(d),e,b;if(a=d.chartHeaderContainer.clientHeight+d.chartContentContainer.clientHeight-24){e=d.chartContentContainer.scrollTop;d.chartContentContainer.scrollTop=d.chartContentContainer.scrollTop+20;if(typeof d.isDuringVerticalScrolling===c){d.isDuringVerticalScrolling=true;setTimeout(function(){b=d.chartContentContainer.scrollTop-e;d.draggingInitialThumbPosition= +d.draggingInitialThumbPosition+b;delete d.isDuringVerticalScrolling},0)}}}},Ua=function(a,d,e,b){ea(a.chartItem,a,b);pa(d,a);setTimeout(function(){if(typeof a.gridItem!==c){if(typeof a.completedInput!==c){var g=a.completedInput;typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);delete a.completedInput}Aa(a.gridItem,a,d,b.columns,e,b.toggleButtonAreaWidth,b)}for(g=a.parent;g!=null;){Ya(g,false);a=g;ea(a.chartItem,a,b);pa(d,a);typeof a.gridItem!==c&&Aa(a.gridItem, +a,d,b.columns,e,b.toggleButtonAreaWidth,b);g=a.parent}},0)},hc=function(a){var d=a.itemTop-a.ganttChartView.chartContentContainer.scrollTop;if(d<0)a.ganttChartView.chartContentContainer.scrollTop=a.itemTop;else if(d>a.ganttChartView.chartContentContainer.clientHeight-a.ganttChartView.settings.itemHeight)a.ganttChartView.chartContentContainer.scrollTop=a.itemTop-(a.ganttChartView.chartContentContainer.clientHeight-a.ganttChartView.settings.itemHeight)},Bc=function(a,d,e,b,g,f,h,m,j,l,n,w,u,t){var o, +p;d.addEventListener("scroll",function(){if(h.scrollTop!=d.scrollTop&&!p){o=true;setTimeout(function(){h.scrollTop=d.scrollTop;setTimeout(function(){o=false},100)},200)}if(b.scrollLeft!=d.scrollLeft)b.scrollLeft=d.scrollLeft},true);cb(d,e,g,t);typeof a.updateGridHeaderTimer!==c&&clearInterval(a.updateGridHeaderTimer);a.updateGridHeaderTimer=setInterval(function(){try{cb(d,e,g,t)}catch(b){try{clearInterval(a.updateGridHeaderTimer)}catch(c){}}},100);h.addEventListener("scroll",function(){if(d.scrollTop!= +h.scrollTop&&!o){p=true;setTimeout(function(){d.scrollTop=h.scrollTop;setTimeout(function(){p=false},100)},200)}if(m.scrollLeft!=h.scrollLeft)m.scrollLeft=h.scrollLeft;va(u,h,t);Ma(u,n,t);t.displayedTime=Ca(h.scrollLeft,t);(typeof a.isDuringScrollToDateTime===c||!a.isDuringScrollToDateTime)&&typeof t.displayedTimeChangeHandler!==c&&setTimeout(function(){t.displayedTimeChangeHandler(t.displayedTime)},0);typeof a.isDuringScrollToDateTime!==c&&delete a.isDuringScrollToDateTime},true);setTimeout(function(){if(m.scrollLeft!= +h.scrollLeft)m.scrollLeft=h.scrollLeft;va(u,h,t)},1);cb(h,j,l,t);typeof a.updateChartHeaderTimer!==c&&clearInterval(a.updateChartHeaderTimer);a.updateChartHeaderTimer=setInterval(function(){try{cb(h,j,l,t)}catch(b){try{clearInterval(a.updateChartHeaderTimer)}catch(d){}}},100);window.addEventListener("mousewheel",function(){try{a.cancelDrag=true}catch(b){}},true)},cb=function(a,d,e,b){setTimeout(function(){try{var c=d.clientWidth-a.clientWidth;c<0&&(c=0);var f=c+"px";if(e.style.width!=f){e.style.width= +f;if(c>0){e.style.boxSizing="border-box";e.style.MozBoxSizing="border-box";e.style.border="solid 1px "+b.border;e.style.borderTop="none";e.style.borderRight="none"}else{e.style.border="";e.style.borderTop="";e.style.borderRight="";e.style.boxSizing="";e.style.MozBoxSizing=""}}}catch(h){}},0)},Ba=function(a,d,e){if(e.isSplitterEnabled){a.style.height=d.clientHeight+"px";a.style.left=Math.max(0,d.offsetWidth-1)+"px"}},va=function(a,d,e){if(!(typeof d.isInitializing!==c&&d.isInitializing)&&e.isVirtualizing)for(var b= +d.scrollTop-e.itemHeight,d=b+d.clientHeight+2*e.itemHeight,g=0;g=b&&f.itemTop=d))&&delete f.isVirtuallyVisible}},yc=function(a,d){for(var e=a.childNodes.length;e-- >0;)a.removeChild(a.childNodes[e]);a.appendChild(d)},vb=function(a,d,e,b){var g=b.indexOf(a);if(!(g<0||d<0||d==g||d>=b.length)){b.splice(g,1);b.splice(d,0,a);ic(b);T(e);typeof e.settings.itemMoveHandler!==c&&e.settings.itemMoveHandler(a, +g,d)}},db=function(a,d,e,b,g){if(!(a<0||e<0||e==a||e>g.length-d)){var f=[],h;for(h=a;hd){b.indentation=d;y(b,"indentation",false,true)}d=b.indentation+1}},Pc=function(a,d,e,b,g,f,h,m,j,l){function n(e){delete b.cancelDrag;b.draggingItem= +d;b.dragType="Ordering";b.style.cursor=a.style.cursor;b.draggingInitialY=e.clientY;b.draggingInitialThumbPosition=0;b.resetChartAreaDefinitions()}a.addEventListener("mousedown",function(a){if(a.button==0){n(a);a.preventDefault()}},true);a.addEventListener("touchstart",function(a){n(a.touches[0]);a.preventDefault()},true);if(typeof b.draggableOrderingItems===c)b.draggableOrderingItems=[];for(var w=false,u=0;ul)||typeof n.displayRowIndex===c&&(z++l+1))){p={content:n.content,indentation:n.indentation,start:n.start,finish:n.finish,completedFinish:n.completedFinish,isMilestone:n.isMilestone,schedule:D(n),assignmentsContent:n.assignmentsContent,baselineStart:n.baselineStart,baselineFinish:n.baselineFinish,isBarVisible:n.isBarVisible,isRelativeToTimezone:n.isRelativeToTimezone,"class":n["class"],style:n.style,barClass:n.barClass,standardBarClass:n.standardBarClass,completedStandardBarClass:n.completedStandardBarClass, +summaryBarClass:n.summaryBarClass,milestoneBarClass:n.milestoneBarClass,baselineBarClass:n.baselineBarClass,barStyle:n.barStyle,standardBarStyle:n.standardBarStyle,completedStandardBarStyle:n.completedStandardBarStyle,summaryBarStyle:n.summaryBarStyle,milestoneBarStyle:n.milestoneBarStyle,baselineBarStyle:n.baselineBarStyle,isSummaryEnabled:n.isSummaryEnabled,isParentSummarizationEnabled:n.isParentSummarizationEnabled,isHidden:n.isHidden,isExported:true,tag:n};if(typeof n.displayRowIndex!==c)p.displayRowIndex= +n.displayRowIndex-j;Qc(p,n);a.push(p);n.exportItem=p}}for(k=0;kl))){p=n.exportItem;if(typeof n.predecessors!==c){p.predecessors=[];for(z=0;zl)||p.predecessors.push({item:y.item.exportItem,dependencyType:y.dependencyType,lag:y.lag,dependencyLineClass:y.dependencyLineClass, +dependencyLineStyle:y.dependencyLineStyle})}}}}var E=q.createElement("p");E.innerHTML=typeof d!==c?d:"";q.body.appendChild(E);var G=q.createElement("div");G.setAttribute("style","width: "+v+"px");try{DlhSoft.Controls.GanttChartView.initialize(G,a,g,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(U){}setTimeout(function(){x&&q.body.setAttribute("style","margin: 0px");var a=q.createElement("div");a.appendChild(G); +q.body.replaceChild(a,E);if(u){a.setAttribute("style","width: "+G.offsetHeight+"px; height: "+v+"px; overflow: hidden");a=Math.round((G.offsetWidth-G.offsetHeight)/2);G.setAttribute("style","width: "+v+"px; transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px); -webkit-transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px)")}q.close();if(typeof C!==void 0){C.focus();if(typeof w!==c&&w){C.print();(typeof t===c||t)&&setTimeout(function(){C.close()})}}},0)},kc=function(a){var d= +ia;if(typeof a===c)return d;for(var e=0;ed)d=b.finish}else if(b.start>d)d=b.start}return new Date(d.valueOf())},lc=function(a,d){for(var e= +0,b=0;b=g)return true;var f;if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var h=a.successorPredecessors?a.successorPredecessors:eb(a,e);for(f=0;f0)&&Ka(g,a,d,e)}},oc=function(a,d,e,b){var d=new Date(d.valueOf()-d.getTimezoneOffset()*6E4),d=ra(d,b,D(a)),e=da(a,b),c=ya(a,b);yb(a,d);Wa(a,e,b);Xa(a,c,b);Y(a)},pc=function(a,d){for(var e=0,b=fa(a),g=0;g=0?e=e+d.specificResourceUsageCosts[m].value*f.value:typeof d.defaultResourceUsageCost!==c&&(e=e+d.defaultResourceUsageCost*f.value);if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var j=da(a,d)/36E5;typeof d.specificResourceHourCosts!==c&&(m=indexOfKey(d.specificResourceHourCosts,h))>=0?e=e+d.specificResourceHourCosts[m].value*j*f.value:typeof d.defaultResourceHourCost!==c&&(e=e+d.defaultResourceHourCost*j*f.value)}}return e},Ab=function(a,d){var e=typeof d.taskInitiationCost!== +c?d.taskInitiationCost:0,e=e+pc(a,d);if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var b=0;b0){n=true;break}u=u.parent}if(!n)continue}g.push({key:j,value:Sc(j)});var u=!f?fa(j):[],t=[];for(n=0;n0&&t.push(o)}m.push({key:j,value:t});w.push(j)}}e=[];for(f=g.length;f>0;){h=[];for(l=0;l=0&&h.indexOf(o)<0){n=false;break}}if(n){t=j;n=d;u=b;if(typeof t.minStart!== +c&&nn&&(n=p);break;case "StartStart":case "SS":p=S(p.item.start,typeof p.lag===c?0:p.lag,u,D(p.item));p>n&&(n=p)}}}for(t=t.parent;t!=null&&typeof t.isSummaryEnabled!==c&&!t.isSummaryEnabled;)t= +t.parent}u=n;n=indexOfKey(m,j);var t=m[n].value,r;for(n=0;n=0){p=1;if(typeof b.resourceQuantities!==c){var s=indexOfKey(b.resourceQuantities,r);if(s>=0)p=b.resourceQuantities[s].value}previousAllocations=e[k].value;for(k=0;ku&&(u=s)}}}}if((a||!Fa(j))&&(u=ra(u,b,D(j)))!=j.start){n=da(j,b);o=ya(j,b);yb(j,u);Wa(j,n,b);Xa(j,o,b)}p=j.finish; +for(n=0;nu){C=r+o;x=zq[C])q[v].value=x;zs[v].value)s[v].value=x}}h.push(j)}}for(l= +0;l +a.start},da=function(a,d){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){for(var e=0,b=a.children,g=0;g0;){a=d[g];a.indentation==0&&b++}return b+(!e?1:0)}return tc(b,d)+"."+(b.children.indexOf(a)+(!e?1:0))},fa=function(a){var d;a=a.assignmentsContent;if(typeof a===c)d=[];else{for(var a= +a.split(","),e=[],b=0;b=0&&m>=0){m=trim(g.substr(h+1,m-h-1));g=trim(g.substr(0,h));h=m.indexOf("%");h>=0&&(m=trim(m.substr(0,h)));try{d=parseFloat(m);f=d/100}catch(j){f=1}}if(!(g.length<=0)){h=indexOfKey(e,g);h<0?e.push({key:g,value:f}):e[h].value=e[h].value+f}}d=e}return d},uc=function(a){for(var d=[],a=fa(a),e=0;e0;){var m=dequeue(h);if(!(m.finish<=m.start))if(e.length==0)e.push({key:m,value:f.value});else{kc(d);for(var j=false,l=0;l=n.finish))if(m.finish<=n.start){for(j=0;j<=l;j++)if(e[j].key.start>=m.start){e.splice(j,0,{key:m,value:f.value});break}j=true;break}else if(m.start<=n.start&&m.finish>=n.finish){e[l].value=w+f.value;m.start< +n.start&&h.push({start:m.start,finish:n.start});m.finish>n.finish&&h.push({start:n.finish,finish:m.finish});j=true;break}else if(m.start>=n.start&&m.finish<=n.finish){e.splice(l,1);m.start>n.start&&e.splice(l++,0,{key:{start:n.start,finish:m.start},value:w});e.splice(l++,0,{key:m,value:w+f.value});m.finish=n.start&&m.finish>=n.finish){e.splice(l,1);m.start>n.start&&e.splice(l++,0,{key:{start:n.start, +finish:m.start},value:w});e.splice(l++,0,{key:{start:m.start,finish:n.finish},value:w+f.value});m.finish>n.finish&&h.push({start:n.finish,finish:m.finish});j=true;break}else if(m.start<=n.start&&m.finish<=n.finish){e.splice(l,1);m.start=0)return true;for(var f=0;f=0||d.splice(d.length,0,h)}}}a.items=d;a.settings=e;a.refresh=function(){T(a)};a.refreshItems=function(){Pa(d)};a.refreshGridItems=function(){for(var a=0;a1;){var u=f.childNodes[g];u.tag!="Scale-Highlighting-CurrentTime"&&u.tag!="Scale-Separator-CurrentTime"&&h.push(u);f.removeChild(u)}hb(b,f,e.scales,e,true);for(g=h.length;g-- >0;)f.appendChild(h[g]);ta(c,ua(d,e))}; +a.setCurrentTime=function(b){e.currentTime=b;a.refreshCurrentTimeLine()};a.updateCurrentTime=function(){var b=new Date,b=new Date(b.valueOf()-b.getTimezoneOffset()*6E4);a.setCurrentTime(b)};a.getCurrentItem=function(){return a.currentItem};a.getSelectedItem=function(){return a.selectedItem};a.getSelectedItems=function(){return a.selectedItems};a.selectItem=function(a){r(a,true,e.selectionMode)};a.unselectItem=function(a){r(a,false,e.selectionMode)};a.expandItem=function(a){ga(a,true,true)};a.collapseItem= +function(a){ga(a,false,true)};a.scrollToItem=hc;a.scrollToBottom=function(){a.chartContentContainer.scrollTop=a.chartContent.clientHeight};a.scrollToDateTime=function(b){a.isDuringScrollToDateTime=true;a.chartContentContainer.scrollLeft=H(b,a.settings)};a.increaseTimelinePage=function(b){e.timelineStart=new Date(e.timelineStart.valueOf()+b);e.timelineFinish=new Date(e.timelineFinish.valueOf()+b);T(a)};a.decreaseTimelinePage=function(b){e.timelineStart=new Date(e.timelineStart.valueOf()-b);e.timelineFinish= +new Date(e.timelineFinish.valueOf()-b);T(a)};a.setSplitterPosition=function(b){var d=a.gridContainer,f=a.chartContainer,g=a.splitter,b=Math.floor(b*1E6/a.offsetWidth)/1E4;typeof d.percent!==c&&delete d.percent;d.style.width=b+"%";f.style.width=100-b+"%";Ba(g,d,e)};a.getChartPosition=function(a){return H(a,e)};a.getChartWidth=function(){return H(e.timelineFinish,e)};a.getDateTime=function(a){return Ca(a,e)};a.getWorkingTime=function(a){return dc(a,e)};a.getStartWorkingTime=function(a){return ra(a, +e)};a.getFinishWorkingTime=function(a){return R(a,e,false,true,void 0)};a.getEffort=function(a,b){return O(a,b,e)};a.getFinish=function(a,b){return S(a,b,e)};a.getStart=function(a,b){return Sa(a,b,e)};a.getCompletion=function(a,b,d){return bb(a,b,d,e)};a.getCompletedFinish=function(a,b,d){return ec(a,b,d,e)};a.getItemsHeight=function(){return ua(d,e)};a.getItemTop=function(a){return za(a,d,e)};a.onItemPropertyChanged=y;a.initializeTaskDraggingThumbs=function(b,d,e,c,f,g,h,o){qb(b,d,e,c,f,g,h,o,a.items, +a,a.settings)};a.initializeDependencyDraggingThumbs=function(b,d,e,c,f,g,h){ab(b,d,e,c,f,g,h,a.items,a,a.settings)};a.insertItem=function(b,c){Zb(b,c,a,d,e)};a.addItem=function(b){a.insertItem(d.length,b)};a.insertItems=function(b,d){for(var e=0;e0?a.items[b.index-1]:null;if(!(f==null||b.indentation>f.indentation)){ga(b,true,false,true);b.indentation++;y(b,"indentation",true,true);if(b.predecessors&&b.predecessors.length>0){for(var g=false,n=0;nf.indentation){b.predecessors.splice(n--,1);g=true}g&&y(b,"predecessors",false,true)}for(g=0;gn.predecessors[h].item.indentation){n.predecessors.splice(h--,1);y(n,"predecessors",false,true);ma(n);qa(n)}}$a(d,e)&&Pa(d);for(Qa(b,d,a,e);b!=null;){b.isExpanded||ga(b,true,false);b=b.parent}}};a.decreaseItemIndentation=function(b){var f=b.index0){for(var g=false,n=0;na.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}};a.setItemIsMilestone=function(a,b){a.isMilestone=b;y(a,"isMilestone",true,true)}; +a.getItemEffort=function(a){return da(a,e)};a.setItemEffort=function(a,b){a.finish=S(a.start,b,e,D(a));y(a,"finish",true,true);if(a.completedFinish>a.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}};a.getItemTotalEffort=function(a){return tb(a)};a.setItemTotalEffort=function(a,b){a.ganttChartView.setItemEffort(a,b/Ta(a))};a.setItemHasFixedEffort=function(a,b){a.hasFixedEffort=b;if(!a.hasChildren&&a.hasFixedEffort){a.fixedEffort=da(a,e);a.fixedEffortAssignments=fa(a)}};a.getItemDuration= +function(a){return O(a.start,a.finish,e,D(a))};a.setItemDuration=a.setItemEffort;a.getItemCompletedEffort=function(a){return ya(a,e)};a.setItemCompletedEffort=function(a,b){a.completedFinish=S(a.start,b,e,D(a));if(a.completedFinish>a.finish)a.completedFinish=a.finish;y(a,"completedFinish",true,true)};a.getItemTotalCompletedEffort=function(a){return ub(a)};a.setItemTotalCompletedEffort=function(a,b){a.ganttChartView.setItemCompletedEffort(a,b/Ta(a))};a.getItemCompletion=function(b){return a.getItemCompletedEffort(b)/ +a.getItemEffort(b)};a.setItemCompletion=function(b,d){a.setItemCompletedEffort(b,d*a.getItemEffort(b))};a.isItemCompleted=function(b){return a.getItemCompletion(b)>=1||(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())&&typeof b.isSetAsCompleted!==c&&b.isSetAsCompleted};a.setItemAsCompleted=function(b){if(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())b.isSetAsCompleted=true;a.setItemCompletion(b,1)};a.hasItemStarted=function(a){return Fa(a)};a.setItemAsNotStarted=function(b){if(b.isMilestone|| +b.finish.valueOf()<=b.start.valueOf())b.isSetAsCompleted=false;a.setItemCompletion(b,0)};a.isItemOnSchedule=function(a){var b=new Date,b=new Date(b.valueOf()-b.getTimezoneOffset()*6E4);return a.completedFinish>=b};a.setItemAssignmentsContent=function(a,b){a.assignmentsContent=b;y(a,"assignmentsContent",true,true)};a.getItemPredecessorsString=function(a,b){var e=b;typeof e===c&&(e=false);var f="";if(!(typeof a.predecessors===c||a.predecessors.length==0))for(var g=0;g0&&(f=f+", ");f=f+(t+(!e?1:0));if(typeof h.dependencyType!==c&&h.dependencyType!=""&&h.dependencyType!="FinishStart"&&h.dependencyType!="FS")if(h.dependencyType=="StartStart"||h.dependencyType=="SS")f=f+"SS";else if(h.dependencyType=="FinishFinish"||h.dependencyType=="FF")f=f+"FF";else if(h.dependencyType=="StartFinish"||h.dependencyType=="SF")f=f+"SF";if(typeof h.lag!==c&&h.lag!=0){h.lag>0&&(f=f+"+");f=f+h.lag/36E5}}}return f};a.setItemPredecessorsString= +function(a,b,e){typeof e===c&&(e=false);var f=[];a.predecessors=f;for(var b=b.split(","),g=0;g=48&&h.charCodeAt(t)<=57;)t++;var o=h.substr(0,t),o=parseInt(o)-(!e?1:0);if(!isNaN(o)&&!(o<0||o>=d.length)){o=d[o];if(!mb(a,o)&&!Da(a,o)&&!Da(o,a)){var h=h.substr(t),t=h.indexOf("+"),p=h.indexOf("-"),k=t>=0?t:p>=0?p:-1,p=0;if(k>=0){var r=parseFloat(h.substr(k+1));isNaN(r)||(p=r*(t>=0?1:-1)*36E5)}h=(k<0?h:h.substr(0, +k)).toUpperCase();f.push({item:o,dependencyType:h,lag:p})}}}}for(e=0;e=d.length-1||vb(b,e+1,a,d)};a.moveItemHierarchy=function(b,e){for(var c=d.indexOf(b),f=c+1;f0;){if(d[f].indentation=b.finish)b=null;else{var h=d.indexOf(b);if(h<0)b=null;else{f={content:typeof f===c?b.content:b.content+f,indentation:b.indentation,isExpanded:b.isExpanded,start:b.completedFinish,finish:b.finish,assignmentsContent:b.assignmentsContent,isReadOnly:b.isReadOnly,isHidden:b.isHidden,isBarVisible:b.isBarVisible,isBarReadOnly:b.isBarReadOnly,isSummaryEnabled:b.isSummaryEnabled,isParentSummarizationEnabled:b.isParentSummarizationEnabled, +displayRowIndex:b.displayRowIndex,"class":b["class"],style:b.style,barClass:b.barClass,standardBarClass:b.standardBarClass,summaryBarClass:b.summaryBarClass,milestoneBarClass:b.milestoneBarClass,baselineBarClass:b.baselineBarClass,barStyle:b.barStyle,standardBarStyle:b.standardBarStyle,summaryBarStyle:b.summaryBarStyle,milestoneBarStyle:b.milestoneBarStyle,baselineBarStyle:b.baselineBarStyle,taskTemplate:b.taskTemplate,template:b.template,tag:b.tag};if(typeof g!==c)b.content=b.content+g;b.finish= +b.completedFinish;Zb(h+1,f,a,d,e);g=eb(b,d);for(h=0;h0){t=true;break}k=k.parent}if(!t)continue}oc(u,g,d,e);o.push(u)}}xb(d,e,a);for(h=0;h0){var h=0;for(c=0;c0){for(c=0;c0&&(f=f+", ");f=f+(g[c].key+(g.length>1?" ["+Math.round(g[c].value/h*1E4)/100+"%]":""))}e.assignmentsContent=f;y(e,"assignmentsContent",false,true);Y(e)}}}};a.levelResources=function(b,c){return qc(b,c,d,e,a)};a.getItemSuccessors=function(a){return nc(a,d)};a.getItemSuccessorPredecessorItems=function(a){return eb(a,d)};a.getItemAllocationUnits= +Ta;a.getItemAssignments=fa;a.getItemAssignedResources=uc;a.getResourceAssignments=function(a){return Ga(a,d)};a.getResourceAssignedItems=function(a){for(var b=[],a=Ga(a,d),e=0;e=0?b=b+e.specificResourceUsageCosts[h].value*g.value:typeof e.defaultResourceUsageCost!==c&&(b=b+e.defaultResourceUsageCost*g.value);var o=g.key;if(!o.hasChildren||!(typeof o.isSummaryEnabled===c||o.isSummaryEnabled)){o=da(o,e)/36E5;typeof e.specificResourceHourCosts!==c&&(h=indexOfKey(e.specificResourceHourCosts,resource))>=0?b=b+e.specificResourceHourCosts[h].value* +o*g.value:typeof e.defaultResourceHourCost!==c&&(b=b+e.defaultResourceHourCost*o*g.value)}}return b};a.getProjectCost=function(){for(var a=0,b=0;b=0)p=e.resourceQuantities[r].value}r=e.maxLoadChartDisplayedResourceQuantity;typeof r===c&&(r=100);p>r&&(p=r);h.ganttChartItems.push({start:k.key.start,finish:k.key.finish, +units:k.value/p,content:Math.round(k.value*1E4)/100+"%",isRelativeToTimezone:false})}b.push(h)}return b};a.getFilteredGanttChartItems=function(a){for(var a=[a],b=[],e=0;e=0)){g.push({tag:o,content:o.content,start:o.start,finish:o.finish,completedFinish:o.completedFinish,isMilestone:o.isMilestone, +assignmentsContent:a.length>1?o.assignmentsContent:h[f].value!=1?Math.round(h[f].value*1E4)/100+"%":"",minStart:o.minStart,maxStart:o.maxStart,minFinish:o.minFinish,maxFinish:o.maxFinish,isHidden:o.isHidden,isBarVisible:o.isBarVisible,isBarReadOnly:o.isBarReadOnly,isReadOnly:true,isRelativeToTimezone:o.isRelativeToTimezone});b.push(o)}}}return g};a.copyCommonSettings=function(a){copyCommonSettings(a,e)};a.getPertChartItems=function(a,b,f,g,h,o){var k=a,r=b,p=f,s=h,f=o;if(typeof k===c||k<0)k=Number.MAX_VALUE; +typeof r===c&&(r="Start");typeof p===c&&(p="Finish");typeof s===c&&(s=" completed");typeof f===c&&(f=" starting");for(var q=new Date((new Date(1E4,0,1)).valueOf()-1),o=[],v,C,x,z,y,h=[],a=0;ax)x=b.finish}v==null&&(v=q);r={content:r,displayedText:(k++).toString(),displayedRowIndex:0,displayedColumnIndex:0};o.push(r);A=[r];q=[];for(a=0;a0){A=[];for(a=0;av){x={content:b.content!=null?b.content.toString()+f:null,displayedText:z,predecessors:[]};o.push(x);x.predecessors.push({item:r,content:g,isEffortVirtual:true})}z={content:b.content+s,displayedText:z+(x!=r?"'":""),predecessors:[],tag:b};A.push(z);o.push(z);z.predecessors.push({item:x,content:getContentPath(b),displayedText:b.content!=null?b.content.toString():null,effort:O(b.start,b.finish,e, +D(b)),tag:b})}do{B=[];for(a=0;a=0&&E.push(h[v].key);if(E.length>0){B.splice(B.indexOf(q),1);for(v=0;v1){s={content:b.content!=null?b.content.toString()+ +f:null,displayedText:q.displayedText,predecessors:[]};o.splice(o.indexOf(q),0,s);k=s.predecessors;for(x=0;xra(a.finish,e)){x={content:b.content!= +null?b.content.toString()+f:null,displayedText:q.displayedText,predecessors:[]};o.splice(o.indexOf(q),0,x);x.predecessors.push({item:p.item,content:g,isEffortVirtual:true});q.predecessors.splice(0,q.predecessors.length);q.predecessors.push({item:x,content:getContentPath(b),displayedText:b.content!=null?b.content.toString():null,effort:O(b.start,b.finish,e,D(b)),tag:b});q.displayedText=q.displayedText+"'"}}}}for(a=0;aC)C=r.finish}p==null&&(p=b);C==null&&(C=f);h={content:h,displayedText:h,earlyStart:p,earlyFinish:p,lateStart:b,lateFinish:b,isMilestone:true,effort:0,displayedRowIndex:0,displayedColumnIndex:0};a.push(h); +g=[h];p=[];for(k=0;k0){g=[];for(k=0;k=0&&A.push(z[p].key);if(A.length>0){y.splice(y.indexOf(v),1);for(p=0;px.earlyStart){x.earlyStart= +s;x.earlyFinish=S(x.earlyStart,x.effort,e)}x.predecessors.push({item:v,tag:r})}s=true}}g=y}while(s)}o={content:o,displayedText:o,earlyStart:f,earlyFinish:f,lateStart:C,lateFinish:C,isMilestone:true,effort:0,predecessors:[],displayedRowIndex:0};a.push(o);p=o.predecessors;for(k=0;ko.earlyStart){o.earlyStart=s;o.earlyFinish=o.earlyStart}p.push({item:z})}for(g=[o];g.length>0;){z=[];for(k=0;k0?R(r,e,false,true,void 0):r;x.lateStart=Sa(x.effort,x.lateFinish,e)}}}g=z}if(a.length>2)for(k=0;k100&&(a=100);b(a)},c,f,h)},timeSpanInputColumnTemplateBase:function(a,d,e,b,g,f,h,m){typeof g===c&&(g=1);return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(a,d,function(){var a=e()/(36E5*g);return Math.round(a*100)/100},function(a){a=parseFloat(a);a<0&&(a=0);b(a*36E5*g)},f,h,m)},datePickerInputColumnTemplateBase:function(a,d,e,b,g,f,h,m,j,l,n,o,k){n||(n=["Su","Mo","Tu", +"We","Th","Fr","Sa"]);var r=o,s=k;if(!o)o=DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter;if(!k)k=DlhSoft.Controls.GanttChartView.defaultDateTimeParser;var p=a.createElement("input");p.setAttribute("type","text");e=e();typeof e===c?e="":e!=null&&(e=o(e));p.setAttribute("value",e);DlhSoft.Controls.DatePicker&&p.addEventListener("focus",function(){var b=DlhSoft.Controls.DatePicker.get(p);if(!b||!b.isOpen){var e=0,d=0;try{e=p.selectionStart;d=p.selectionEnd}catch(c){}b=DlhSoft.Controls.DatePicker.initialize(p, +void 0,{inputStyle:null,defaultTimeOfDay:m,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:j,months:l,daysOfWeek:Va(n),dateTimeFormatter:r,dateTimeParser:s},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{p.selectionStart=e;p.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)== +null?setTimeout(function(){try{p.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);p.dispatchEvent(b)})}},true);o="";typeof f!==c&&!f()&&(o="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");p.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+o+f);typeof g!==c&&!g()&&p.setAttribute("disabled","true");var q=function(){var a=p.value,a=a!=""?k(a):null;b(a)}; +p.addEventListener("change",function(){q()},true);p.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();q()}},true);p.addEventListener("focus",function(){p.style.backgroundColor="White"},true);p.addEventListener("blur",function(){p.style.backgroundColor="Transparent"},true);return p},dateTimePickerInputColumnTemplateBase:function(a,d,e,b,g,f,h,m,j,l,n,o,k){n||(n=["Su","Mo","Tu","We","Th","Fr","Sa"]);var r=o,s=k;if(!o)o=DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter; +if(!k)k=DlhSoft.Controls.GanttChartView.defaultDateTimeParser;var p=a.createElement("input");p.setAttribute("type","text");e=e();typeof e===c?e="":e!=null&&(e=o(e));p.setAttribute("value",e);(DlhSoft.Controls.DateTimePicker||DlhSoft.Controls.DatePicker)&&p.addEventListener("focus",function(){var b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(p);if(!b||!b.isOpen){var e=0,d=0;try{e=p.selectionStart;d=p.selectionEnd}catch(c){}b=(DlhSoft.Controls.DateTimePicker? +DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(p,void 0,{inputStyle:null,defaultTimeOfDay:m,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:j,months:l,daysOfWeek:Va(n),dateTimeFormatter:r,dateTimeParser:s},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{p.selectionStart= +e;p.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{p.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);p.dispatchEvent(b)})}},true);o="";typeof f!==c&&!f()&&(o="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");p.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+o+f);typeof g!==c&& +!g()&&p.setAttribute("disabled","true");var q=function(){var a=p.value,a=a!=""?k(a):null;b(a)};p.addEventListener("change",function(){q()},true);p.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();q()}},true);p.addEventListener("focus",function(){p.style.backgroundColor="White"},true);p.addEventListener("blur",function(){p.style.backgroundColor="Transparent"},true);return p},multiSelectorComboBoxInputColumnTemplateBase:function(a,d,e,b,g,f,h,m){var j= +a.createElement("input");j.setAttribute("type","text");b=b();typeof b===c&&(b="");j.setAttribute("value",b);DlhSoft.Controls.MultiSelectorComboBox&&j.addEventListener("focus",function(){var b=DlhSoft.Controls.MultiSelectorComboBox.get(j);if(!b||!b.isOpen&&b.availableChoices.length>0){var b=e(),d=0,c=0;try{d=j.selectionStart;c=j.selectionEnd}catch(f){}b=DlhSoft.Controls.MultiSelectorComboBox.initialize(j,b,void 0,{inputStyle:null,autoAppendAvailableChoices:false,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0; color: Black; font-size: small; max-height: 188px; overflow-y: auto"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{j.selectionStart=d;j.selectionEnd=c}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{j.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);j.dispatchEvent(b)})}},true);b="";typeof h!==c&& +!h()&&(b="; display: none");h="";typeof m!==c&&m()&&(h="; font-weight: bold");j.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+b+h);typeof f!==c&&!f()&&j.setAttribute("disabled","true");j.addEventListener("change",function(){g(j.value)},true);j.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(j.value)}},true);j.addEventListener("focus",function(){j.style.backgroundColor="White"},true);j.addEventListener("blur", +function(){j.style.backgroundColor="Transparent"},true);return j},dateTimeInputColumnTemplateBase:function(a,d,e,b,c,f,h){return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(a,d,function(){var a=e();return a!=null?DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter(a):""},function(a){a=a!=""?DlhSoft.Controls.GanttChartView.defaultDateTimeParser(a):null;b(a)},c,f,h)},getIndexColumnTemplate:function(){return function(a){var d=a.ganttChartView;return DlhSoft.Controls.GanttChartView.textColumnTemplateBase(d.ownerDocument, +function(){return d.getItemIndexString(a)})}},getWbsColumnTemplate:function(a){return function(d){var e=d.ganttChartView;return DlhSoft.Controls.GanttChartView.textColumnTemplateBase(e.ownerDocument,function(){return e.getItemWbsIndexString(d,a)})}},getEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemEffort(b)},function(a){g.setItemEffort(b, +a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getDurationColumnTemplate:function(a,d,e){typeof d=== +c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemDuration(b)},function(a){g.setItemDuration(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone|| +typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getTotalEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemTotalEffort(b)},function(a){g.setItemTotalEffort(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!== +c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getCompletedEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument, +a,function(){return g.getItemCompletedEffort(b)},function(a){g.setItemCompletedEffort(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled=== +c||b.isSummaryEnabled)})}},getTotalCompletedEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemTotalCompletedEffort(b)},function(a){g.setItemTotalCompletedEffort(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&& +!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getCompletionColumnTemplate:function(a,d){return function(e){var b=e.ganttChartView;return DlhSoft.Controls.GanttChartView.percentInputColumnTemplateBase(b.ownerDocument,a,function(){var a=b.getItemCompletion(e)*100;return Math.round(a*100)/100},function(a){if(typeof e.gridItem!== +c&&typeof e.completedInput!==c){var d=e.completedInput;typeof d.changeEventListener!==c&&d.removeEventListener("change",d.changeEventListener,true);delete e.completedInput}a=parseFloat(a)/100;b.setItemCompletion(e,a);b.refreshItemPath(e)},function(){return!(e.isReadOnly||d||typeof e.ganttChartView!==c&&typeof e.ganttChartView.settings!==c&&(e.ganttChartView.settings.isReadOnly||e.ganttChartView.settings.isGridReadOnly))&&!(e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled))},function(){return!(e.isMilestone|| +typeof e.isBarVisible!==c&&!e.isBarVisible)},function(){return e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled)})}},getCostColumnTemplate:function(a,d){return function(e){var b=e.ganttChartView;return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(b.ownerDocument,a,function(){return b.getItemCost(e)},function(a){b.setItemCost(e,a);b.refreshItemPath(e)},function(){return!(e.isReadOnly||d||typeof e.ganttChartView!==c&&typeof e.ganttChartView.settings!==c&&(e.ganttChartView.settings.isReadOnly|| +e.ganttChartView.settings.isGridReadOnly))},void 0,function(){return e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled)})}},getPredecessorsColumnTemplate:function(a,d,e){return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemPredecessorsString(b,e)},function(a){g.setItemPredecessorsString(b,a,e);g.refreshItemGraph(b)},function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!== +c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getAssignmentSelectorColumnTemplate:function(a,d,e){return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.optionSelectColumnTemplateBase(g.ownerDocument,a,function(){return typeof d==="array"?d:d(b)},function(){return b.assignmentsContent}, +function(a){b.assignmentsContent=a;g.onItemPropertyChanged(b,"assignmentsContent",true,true);g.refreshItem(b)},function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getBaselineStartColumnTemplate:function(a,d,e,b,g,f, +h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.baselineStart},function(a){a!=null?j.baselineStart=a:delete j.baselineStart;l.onItemPropertyChanged(j,"baselineStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly|| +o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h)}},getBaselineFinishColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase: +DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.baselineFinish},function(a){a!=null?j.baselineFinish=a:delete j.baselineFinish;l.onItemPropertyChanged(j,"baselineFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))}, +function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h)}},getMinStartColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument, +a,function(){return j.minStart},function(a){a!=null?j.minStart=a:delete j.minStart;l.onItemPropertyChanged(j,"minStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&& +(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h)}},getMaxStartColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.maxStart},function(a){a!=null?j.maxStart=a:delete j.maxStart; +l.onItemPropertyChanged(j,"maxStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h)}},getMinFinishColumnTemplate:function(a, +d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.minFinish},function(a){a!=null?j.minFinish=a:delete j.minFinish;l.onItemPropertyChanged(j,"minFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly|| +o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h)}},getMaxFinishColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l= +j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.maxFinish},function(a){a!=null?j.maxFinish=a:delete j.maxFinish;l.onItemPropertyChanged(j,"maxFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&& +(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h)}},getIconColumnTemplate:function(a,d,e,b,g,f,h,o,j){if(typeof a==="string")var l=a,a=function(){return l};typeof b===c||b==false?b=function(){return false}:b==true&& +(b=function(){return true});return function(l){var k=l.ganttChartView,r=k.ownerDocument.createElement("img");r.setAttribute("src",a(l));typeof d!==c&&r.setAttribute("class",d);typeof e!==c&&r.setAttribute("style",e);if(!k.settings.isReadOnly&&!k.settings.isGridReadOnly&&b(l)){r.style.cursor="move";Pc(r,l,k.items,k,k.settings,g,f,h,o,j)}return r}},getOutputDate:convertToLocalTimezone,getInputDate:convertToUTC}}()); +void 0==DlhSoft.Controls.ScheduleChartView&&(DlhSoft.Controls.ScheduleChartView=function(){var c=function(c,k,s,q){var v=["DlhSoft.Controls","ScheduleChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[v[5]][v[4]](c,v[0],v[1],v[2],v[3],q,s);c.isScheduleChartInitializing=true;for(var q=k,k=[],C=v=0,r=0;r=k.chartHeaderContainer.clientHeight+k.chartContentContainer.clientHeight-24){s=k.chartContentContainer.scrollTop;k.chartContentContainer.scrollTop=k.chartContentContainer.scrollTop+20;if(typeof k.isDuringVerticalScrolling==="undefined"){k.isDuringVerticalScrolling=true;setTimeout(function(){q=k.chartContentContainer.scrollTop- +s;k.draggingInitialThumbPosition=k.draggingInitialThumbPosition+q;delete k.isDuringVerticalScrolling},0)}}}},Z=function(c,k,s,q){var v=q.indexOf(c);if(!(v<0||k<0||k==v||k>=q.length)){q.splice(v,1);q.splice(k,0,c);N(s);typeof s.settings.itemMoveHandler!=="undefined"&&s.settings.itemMoveHandler(c,v,k)}},sa=function(c,k,s,q){for(var v=0;vs.length-r)){var v=[],x;for(x=k;x=s.length-1||Z(k,r+1,c,s)}},x=function(c,k){c.items=k;c.refresh=function(){N(c)}};return{initialize:c,refresh:N,getDefaultColumns:aa,getDefaultScales:DlhSoft.Controls.GanttChartView.getDefaultScales,getDefaultStyleDefinitionTemplate:DlhSoft.Controls.GanttChartView.getDefaultStyleDefinitionTemplate, +getDefaultStandardTaskTemplate:DlhSoft.Controls.GanttChartView.getDefaultStandardTaskTemplate,getDefaultMilestoneTaskTemplate:DlhSoft.Controls.GanttChartView.getDefaultMilestoneTaskTemplate,getDefaultItemTemplate:DlhSoft.Controls.GanttChartView.getDefaultItemTemplate,getDefaultAssignmentsTemplate:DlhSoft.Controls.GanttChartView.getDefaultAssignmentsTemplate,initializeTaskDraggingThumbs:DlhSoft.Controls.GanttChartView.initializeTaskDraggingThumbs,initializeDependencyDraggingThumb:DlhSoft.Controls.GanttChartView.initializeDependencyDraggingThumb, +initializeAssignmentDraggingThumb:function(c,k,s,q,v){s.scheduleChartView.initializeAssignmentDraggingThumb(c,k,s,q,v)},getWorkingTime:DlhSoft.Controls.GanttChartView.getWorkingTime,getEffort:DlhSoft.Controls.GanttChartView.getEffort,getFinish:DlhSoft.Controls.GanttChartView.getFinish,getStart:DlhSoft.Controls.GanttChartView.getStart,getCompletion:DlhSoft.Controls.GanttChartView.getCompletion,getCompletedFinish:DlhSoft.Controls.GanttChartView.getCompletedFinish,textColumnTemplateBase:DlhSoft.Controls.GanttChartView.textColumnTemplateBase, +textInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase,getOutputDate:DlhSoft.Controls.GanttChartView.getOutputDate,getInputDate:DlhSoft.Controls.GanttChartView.getInputDate}}()); +void 0==DlhSoft.Controls.LoadChartView&&(DlhSoft.Controls.LoadChartView=function(){var c=function(c,o,k,s){var q=["DlhSoft.Controls","LoadChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[q[5]][q[4]](c,q[0],q[1],q[2],q[3],s,k);c.isLoadChartInitializing=true;for(var s=o,o=[],v=q=0,C=0;C0;)c.chartItemArea.removeChild(c.chartItemArea.childNodes[r]);r=c.chartItemArea;var z=q.getChartPosition(c.start,v),q=Math.max(q.getChartPosition(c.finish,v),z+4),x=x.createElementNS("http://www.w3.org/2000/svg","rect"),A=typeof c.units!=="undefined"?c.units:1,B=Math.min(A,v.maxDisplayedUnits)/v.maxDisplayedUnits*v.barHeight;x.setAttribute("x",z);x.setAttribute("y",v.barMargin+(v.barHeight-B));x.setAttribute("width",Math.max(0,q-z-1));x.setAttribute("height", +B);z=A==1?v.normalAllocationBarClass:A<1?v.underAllocationBarClass:v.overAllocationBarClass;if(typeof c.allocationBarClass!=="undefined")z=c.allocationBarClass;if(typeof z!=="undefined")x.setAttribute("class",z);else{v=A==1?v.normalAllocationBarStyle:A<1?v.underAllocationBarStyle:v.overAllocationBarStyle;if(typeof c.allocationBarStyle!=="undefined")v=c.allocationBarStyle;typeof v!=="undefined"&&x.setAttribute("style",v)}r.appendChild(x);return r}},L=function(c,o,k,s){var q=s.indexOf(c);if(!(q<0|| +o<0||o==q||o>=s.length)){s.splice(q,1);s.splice(o,0,c);N(k);typeof k.settings.itemMoveHandler!=="undefined"&&k.settings.itemMoveHandler(c,q,o)}},Q=function(c,o){for(var k in o)k.indexOf("custom")!=0&&k.indexOf("description")!=0||typeof c[k]==="undefined"&&(c[k]=o[k])},V=function(c,o,k,s,q,v,C,r,z,A,B,I,M,K,L,N,E){var U,T=[],G;if(typeof s!=="undefined")for(U=0;UA)||typeof B.displayRowIndex==="undefined"&&(Z++A+1))){E={content:B.content,indentation:B.indentation,start:B.start,finish:B.finish,units:B.units,isBarVisible:B.isBarVisible, +isRelativeToTimezone:B.isRelativeToTimezone,"class":B["class"],style:B.style,barClass:B.barClass,barStyle:B.barStyle,isSummaryEnabled:B.isSummaryEnabled,isParentSummarizationEnabled:B.isParentSummarizationEnabled,isHidden:B.isHidden,isExported:true,tag:B};if(typeof B.displayRowIndex!=="undefined")E.displayRowIndex=B.displayRowIndex-z;Q(E,B);c.push(E);B.exportItem=E}}var Ja=P.createElement("p");Ja.innerHTML=typeof o!=="undefined"?o:"";P.body.appendChild(Ja);var ca=P.createElement("div");ca.setAttribute("style", +"width: "+V+"px");try{DlhSoft.Controls.LoadChartView.initialize(ca,c,q,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(Ha){}setTimeout(function(){aa&&P.body.setAttribute("style","margin: 0px");var c=P.createElement("div");c.appendChild(ca);P.body.replaceChild(c,Ja);if(M){c.setAttribute("style","width: "+ca.offsetHeight+"px; height: "+V+"px; overflow: hidden");c=Math.round((ca.offsetWidth-ca.offsetHeight)/ +2);ca.setAttribute("style","width: "+V+"px; transform: rotate(90deg) translateX("+c+"px) translateY("+c+"px); -webkit-transform: rotate(90deg) translateX("+c+"px) translateY("+c+"px)")}P.close();if(typeof W!==void 0){W.focus();if(typeof I!=="undefined"&&I){W.print();(typeof K==="undefined"||K)&&setTimeout(function(){W.close()})}}},0)},Z=function(c,o,k,s){for(var q=0;qk.length-q)){var s=[],A;for(A=o;A=k.length-1||L(o,q+1,c,k)}},sa=function(c,o,k){c.items=o;c.refresh=function(){N(c)};c.exportContent=function(s,q){typeof s==="undefined"&&(s={});V(s.title,s.preparingMessage,s.isGridVisible,s.columnIndexes,s.timelineStart,s.timelineFinish,s.isRelativeToTimezone, +s.hourWidth,s.startRowIndex,s.endRowIndex,q,false,s.rotate,false,c,o,k)};c.print=function(s){typeof s==="undefined"&&(s={});V(s.title,s.preparingMessage,s.isGridVisible,s.columnIndexes,s.timelineStart,s.timelineFinish,s.isRelativeToTimezone,s.hourWidth,s.startRowIndex,s.endRowIndex,null,true,s.rotate,s.autoClose,c,o,k)}};return{initialize:c,refresh:N,getDefaultColumns:aa,getDefaultScales:DlhSoft.Controls.GanttChartView.getDefaultScales,getDefaultAllocationTemplate:I,getDefaultItemTemplate:DlhSoft.Controls.GanttChartView.getDefaultItemTemplate, +getWorkingTime:DlhSoft.Controls.GanttChartView.getWorkingTime,textColumnTemplateBase:DlhSoft.Controls.GanttChartView.textColumnTemplateBase,textInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase,getOutputDate:DlhSoft.Controls.GanttChartView.getOutputDate,getInputDate:DlhSoft.Controls.GanttChartView.getInputDate}}()); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.React.Components.jsx b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.React.Components.jsx new file mode 100644 index 000000000..c4d92b593 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.React.Components.jsx @@ -0,0 +1,53 @@ +import React from 'react'; +const DlhSoft = window.DlhSoft; + +export var GanttChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.GanttChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); + +export var ScheduleChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.ScheduleChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); + +export var LoadChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.LoadChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Vue.Components.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Vue.Components.js new file mode 100644 index 000000000..1bc21f052 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.GanttChart.Vue.Components.js @@ -0,0 +1,44 @@ +Vue.component('gantt-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.GanttChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); + +Vue.component('schedule-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.ScheduleChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); + +Vue.component('load-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.LoadChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Angular.Components.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Angular.Components.ts new file mode 100644 index 000000000..2b82c0a26 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Angular.Components.ts @@ -0,0 +1,63 @@ +import { Component, OnInit, ElementRef, Input } from '@angular/core'; +import PertChartItem = DlhSoft.Controls.Pert.PertChartView.Item; +import PertChartSettings = DlhSoft.Controls.Pert.PertChartView.Settings; +import NetworkDiagramItem = DlhSoft.Controls.Pert.NetworkDiagramView.Item; +import NetworkDiagramSettings = DlhSoft.Controls.Pert.NetworkDiagramView.Settings; + +@Component({ + selector: 'pertchartview', + template: '
' +}) +export class PertChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: PertChartItem[] = []; + @Input() settings: PertChartSettings = {}; + @Input() license: string; + @Input() change: (item: PertChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.PertChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} + +@Component({ + selector: 'networkdiagramview', + template: '
' + }) + export class NetworkDiagramView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: NetworkDiagramItem[] = []; + @Input() settings: NetworkDiagramSettings = {}; + @Input() license: string; + @Input() change: (item: NetworkDiagramItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.NetworkDiagramView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } + } diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Angular.Directives.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Angular.Directives.js new file mode 100644 index 000000000..74e85667a --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Angular.Directives.js @@ -0,0 +1,59 @@ +// Version 1.0.0.0. +var module = angular.module("DlhSoft.ProjectData.PertChart.Directives", []); +dsDefinePDPCDirective(module, "PertChart"); +dsDefinePDPCDirective(module, "NetworkDiagram"); +function dsDefinePDPCDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert[controlName ? controlName : directiveName + "View"].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function () { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.d.ts new file mode 100644 index 000000000..74174483f --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.d.ts @@ -0,0 +1,351 @@ +/* Assembly: DlhSoft.ProjectData.PertChart.HTML.Controls, + Company: DlhSoft, + Product: Project Data Modern Library, + Version: 5.3.1.0, + Copyright: Copyright © 2012-2016 DlhSoft, + Title: Project Data PERT Chart HTML Controls, + Description: Project Data PERT Chart related HTML client components */ + +/* +/// +*/ + +declare module DlhSoft.Controls.Pert { + /** Represents a control that presents task event data items using a PERT Chart. */ + module PertChartView { + /** + * Initializes a PertChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Task event data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultTaskEventTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultDependencyLineTemplate(items: Item[], settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + function getDefaultPredecessorItemTemplate(settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + + /** Inside task event template functions, sets up task event drag and drop behavior for the non-null SVG element specified to be designed as thumb, considering the specified item and item positioning in the chart. */ + function initializeTaskEventDraggingThumbs(thumb: SVGElement, item: Item, itemLeft: number, itemTop: number): void; + + function defaultTimeSpanFormatter(timeSpan: number): string; + + /** Represents an HTML element that supplementary provides PertChartView component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshItems(): void; refreshItem(item: Item): void; refreshPredecessorItems(item: Item): void; refreshItemGraph(item: Item): void; + + scrollToItem(item: Item): void; scrollToLeft(): void; scrollToTop(): void; scrollToRight(): void; scrollToBottom(): void; + + /** Returns the actual width of the chart area. */ + getChartWidth(): number; + /** Returns the actual height of the chart area. */ + getChartHeight(): number; + + getItemLeft(item: Item): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + isItemCritical(item: Item): boolean; getCriticalItems(): Item[]; + isDependencyCritical(predecessorItem: PredecessorItem): boolean; getCriticalDependencies(): PredecessorItem[]; + + /** Updates the vertical position of start and finish nodes, assuming they are the first and the last items in the collection, to the first or between the first and second row in the view (when there is at least one item with two or more successors in the collection). */ + repositionEnds(): void; + + isInitializing: boolean; isInitialized: boolean; + } + + /** Represents a task event data item and its PERT Chart representation. */ + interface Item { + /** The object that is displayed to represent the task event item in the task event shape tool tips, usually the task event name. */ + content: any; + + /** The object that is displayed to represent the task event item in the task event shape, usually a short task event name or identifier. */ + displayedText: any; + + isShapeVisible?: boolean; + + displayRowIndex?: number; displayColumnIndex?: number; + + shapeClass?: string; shapeStyle?: string; + taskEventTemplate? (item: Item): SVGElement; + template? (item: Item): SVGElement; + + /** The predecessors collection defines predecessor items (objects) representing the tasks displayed in the PERT Chart view as dependency lines. */ + predecessors?: PredecessorItem[]; + } + + /** Represents a depdendency between two task event data items and its PERT Chart representation. */ + interface PredecessorItem { + /** Task event item that precedes the owner of the predecessor item (the item that the current item depends of). */ + item: Item; + + /** The object that is displayed to represent the task item in the dependency line tool tips, usually the task name. */ + content?: any; + + /** The object that is displayed to represent the task item on the dependency line, usually a short task name or identifier. */ + displayedText?: any; + + effort?: number; isEffortVirtual?: boolean; + + dependencyLineClass?: string; dependencyLineStyle?: string; dependencyTextClass?: string; dependencyTextStyle?: string; + template? (item: Item, predecessorItem: PredecessorItem): SVGElement; + } + + /** Represents settings for a PertChartView component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + /** Indicates whether the user can change the canvas positions of task event items in the control by drag and drop operations (by default it is set to true). */ + canUserRearrangeItems?: boolean; + + /** Indicates whether the task event item shapes are snapping to row and column based guidelines in the control during drag and drop based rearrange operations (by default it is set to true). */ + snapRearrangedItemsToGuidelines?: boolean; + + chartMargin?: number; + itemWidth?: number; itemHeight?: number; + + /** The aspect ratio of the chart, indicating the rate between horizontal and vertical item layout positioning. */ + aspectRatio?: number; + + shapeWidth?: number; shapeHeight?: number; + dependencyTextBlockWidth?: number; + + styleDefinitionTemplate? (): SVGDefsElement; + shapeClass?: string; shapeStyle?: string; dependencyTextClass?: string; dependencyTextStyle?: string; + temporaryThumbClass?: string; temporaryThumbStyle?: string; + dependencyLineClass?: string; dependencyLineStyle?: string; + + taskEventTemplate? (item: Item): SVGElement; + extraTaskEventTemplate? (item: Item): SVGElement; + + isTaskEventToolTipVisible?: boolean; + itemTemplate? (item: Item): SVGElement; + + dependencyLineTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + isDependencyToolTipVisible?: boolean; + predecessorItemTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + /** Converts time span values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + timeSpanFormatter? (timeSpan: number): string; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + mouseHandler? (eventName: string, item: Item, button: number, clickCount: number, e: MouseEvent): void; + mouseMoveHandler? (item: Item): void; + mouseDownHandler? (item: Item, button: number): void; + itemClickHandler? (item: Item): void; + itemDoubleClickHandler? (item: Item): void; + dependencyLineClickHandler? (predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + dependencyLineDoubleClickHandler?(predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + } + + /** Represents export settings for a PertChartView component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + rotate?: boolean; + autoClose?: boolean; + } + } + + /** Represents a control that presents task data items using a Network Diagram. */ + module NetworkDiagramView { + /** + * Initializes a NetworkDiagramView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Task data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultDependencyLineTemplate(items: Item[], settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + function getDefaultPredecessorItemTemplate(settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + + /** Inside task template functions, sets up task drag and drop behavior for the non-null SVG element specified to be designed as thumb, considering the specified item and item positioning in the diagram. */ + function initializeTaskDraggingThumbs(thumb: SVGElement, item: Item, itemLeft: number, itemTop: number): void; + + function defaultDateTimeFormatter(date: Date): string; + function defaultTimeSpanFormatter(timeSpan: number): string; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides NetworkDiagramView component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshItems(): void; refreshItem(item: Item): void; refreshPredecessorItems(item: Item): void; refreshItemGraph(item: Item): void; + + scrollToItem(item: Item): void; scrollToLeft(): void; scrollToTop(): void; scrollToRight(): void; scrollToBottom(): void; + + /** Returns the actual width of the diagram area. */ + getChartWidth(): number; + /** Returns the actual height of the diagram area. */ + getChartHeight(): number; + + getItemLeft(item: Item): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + isItemCritical(item: Item): boolean; getCriticalItems(): Item[]; + isDependencyCritical(predecessorItem: PredecessorItem): boolean; getCriticalDependencies(): PredecessorItem[]; + + /** Updates the vertical position of start and finish nodes, assuming they are the first and the last items in the collection, to the first or between the first and second row in the view (when there is at least one item with two or more successors in the collection). */ + repositionEnds(): void; + + isInitializing: boolean; isInitialized: boolean; + } + + /** Represents a task data item and its Network Diagram representation. */ + interface Item { + /** The object that is displayed to represent the task item in the task shape tool tips, usually the full task name and path. */ + content: any; + + /** The object that is displayed to represent the task item in the task shape, usually a short task name or identifier. */ + displayedText: any; + + effort: number; earlyStart: Date; earlyFinish: Date; lateStart: Date; lateFinish: Date; + + /** A milestone task is displayed in the Network Diagram view using a supplemental task shape template. */ + isMilestone?: boolean; + + slack: number; + + isRelativeToTimezone?: boolean; + + isShapeVisible?: boolean; + + displayRowIndex?: number; displayColumnIndex?: number; + + shapeClass?: string; milestoneClass?: string; shapeStyle?: string; milestoneStyle?: string; + taskTemplate? (item: Item): SVGElement; + template? (item: Item): SVGElement; + + /** The predecessors collection defines predecessor items (objects) referring the task items that the current item depends of, and having the relations displayed in the Network Diagram view as dependency lines. */ + predecessors?: PredecessorItem[]; + } + + /** Represents a depdendency between two task data items and its Network Diagram representation. */ + interface PredecessorItem { + /** Task item that precedes the owner of the predecessor item (the item that the current item depends of). */ + item: Item; + + dependencyLineClass?: string; dependencyLineStyle?: string; + template? (item: Item, predecessorItem: PredecessorItem): SVGElement; + } + + /** Represents settings for a NetworkDiagramView component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + /** Indicates whether the user can change the canvas positions of task items in the control by drag and drop operations (by default it is set to true). */ + canUserRearrangeItems?: boolean; + + /** Indicates whether the task item shapes are snapping to row and column based guidelines in the control during drag and drop based rearrange operations (by default it is set to true). */ + snapRearrangedItemsToGuidelines?: boolean; + + diagramMargin?: number; + itemWidth?: number; itemHeight?: number; + + /** The aspect ratio of the diagram, indicating the rate between horizontal and vertical item layout positioning. */ + aspectRatio?: number; + + shapeWidth?: number; shapeHeight?: number; + minDependencyLineLength?: number; + + styleDefinitionTemplate? (): SVGDefsElement; + shapeClass?: string; milestoneClass?: string; shapeStyle?: string; milestoneStyle?: string; + temporaryThumbClass?: string; temporaryThumbStyle?: string; + dependencyLineClass?: string; dependencyLineStyle?: string; + + taskTemplate? (item: Item): SVGElement; + extraTaskTemplate? (item: Item): SVGElement; + + isTaskToolTipVisible?: boolean; + itemTemplate? (item: Item): SVGElement; + + dependencyLineTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + isDependencyToolTipVisible?: boolean; + predecessorItemTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + /** Converts date and time values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateTimeFormatter? (dateTime: Date): string; + + /** Converts time span values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + timeSpanFormatter? (timeSpan: number): string; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + mouseHandler? (eventName: string, item: Item, button: number, clickCount: number, e: MouseEvent): void; + mouseMoveHandler? (item: Item): void; + mouseDownHandler? (item: Item, button: number): void; + itemClickHandler? (item: Item): void; + itemDoubleClickHandler? (item: Item): void; + dependencyLineClickHandler? (predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + dependencyLineDoubleClickHandler?(predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + } + + /** Represents export settings for a NetworkDiagramView component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + rotate?: boolean; + autoClose?: boolean; + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.js new file mode 100644 index 000000000..2ef8f5e8b --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.js @@ -0,0 +1,150 @@ +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.PertChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.17.0",copyright:"Copyright \u00a9 2012-2020 DlhSoft",title:"Project Data PERT Chart HTML Controls",description:"Project Data PERT Chart related HTML client components"}); +DlhSoft.buildReleaseDate=function(L,M,O){L=new Date(L,M-1,O);return L>DlhSoft.buildReleaseDate?L:DlhSoft.buildReleaseDate}(2020,11,25);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var L=_0x5c25[1],M=_0x5c25[2],O=[],T=[],U=_0x5c25[3],Z=function(I,D){if(typeof I!==M||typeof D!==M)return!1;if(D==U)return!0;var J=D[_0x5c25[11]](_0x5c25[10]);if(0<=J){var w=D[_0x5c25[12]](0,J),y,C=w[_0x5c25[11]](_0x5c25[10]);if(0<=C)try{y=new Date(parseInt(w[_0x5c25[12]](C+1)))}catch(x){}typeof y===L&&(y=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>y)return!1;w=w+_0x5c25[10]+I;for(i=y=0;iy&&(y=Math[_0x5c25[15]](2,32)-y);w=y.toString(16)[_0x5c25[16]]();J=D[_0x5c25[12]](J+1);if(w==J)return!0}return!1},P=function(I,D,J,w,y){var C=_0x5c25[17],x=_0x5c25[18],K=typeof ComponentSource===L||!ComponentSource?x+_0x5c25[19]+w+_0x5c25[20]+y:_0x5c25[21],E=w+_0x5c25[22]+y+_0x5c25[23],G=_0x5c25[24],F=_0x5c25[25],H=_0x5c25[26];setTimeout(function(){var A=I[_0x5c25[27]],y=A[_0x5c25[29]](_0x5c25[28]);y[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var w=A[_0x5c25[29]](_0x5c25[28]);w[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);w[_0x5c25[35]](B);B[_0x5c25[35]](A[_0x5c25[36]](C));w[_0x5c25[35]](A[_0x5c25[36]](G+_0x5c25[10]));B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);B[_0x5c25[35]](A[_0x5c25[36]](D));w[_0x5c25[35]](B);w[_0x5c25[35]](A[_0x5c25[36]](F+_0x5c25[10]));B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);B[_0x5c25[35]](A[_0x5c25[36]](E));w[_0x5c25[35]](B);w[_0x5c25[35]](A[_0x5c25[36]](H+ +_0x5c25[10]));B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var x=A[_0x5c25[29]](_0x5c25[39]);x[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);x[_0x5c25[32]](_0x5c25[41],K);x[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);x[_0x5c25[35]](A[_0x5c25[36]](_0x5c25[44]));B[_0x5c25[35]](x);x=A[_0x5c25[29]](_0x5c25[39]);x[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);x[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);x[_0x5c25[35]](A[_0x5c25[36]](_0x5c25[47]));x[_0x5c25[50]](_0x5c25[48],function(){I[_0x5c25[49]](y);T[_0x5c25[7]](J)}, +!1);B[_0x5c25[35]](x);w[_0x5c25[35]](B);y[_0x5c25[35]](w);I[_0x5c25[35]](y)},0);setTimeout(function(){alert(C+_0x5c25[51]+G+_0x5c25[52]+D+_0x5c25[51]+F+_0x5c25[53]+E+_0x5c25[51]+H+_0x5c25[4])},6E5)};return{setLicense:function(I,D){O[_0x5c25[7]]({type:I,content:D})},validate:function(I,D,J,w,y,C,x){for(var D=D+_0x5c25[4]+J,K=0;K0?a.insertBefore(h,a.childNodes[0]):a.appendChild(h)}catch(c){}},0)};h.addEventListener("mousedown",c,true);l.addEventListener("mouseup",c,true);s.appendChild(h);s.chartArea=h;var u;setTimeout(function(){u=b.clientHeight},0);typeof b.heightUpdateTimer!=="undefined"&&clearInterval(b.heightUpdateTimer); +b.heightUpdateTimer=setInterval(function(){try{if(!(b.clientHeight<=0)){var a=b.clientHeight;if(a!=u){var h=J(b,f,d);g.style.height=h;u=a}}}catch(c){try{clearInterval(b.heightUpdateTimer)}catch(l){}}},100);var k=function(a,h,c,g){var b;if(d.mouseHandler||d.mouseMoveHandler&&g=="mousemove"||d.mouseDownHandler&&g=="mousedown"||d.clickHandler&&g=="click"||d.doubleClickHandler&&g=="dblclick"){var j=a.which;!j&&a.button&&(a.button&1?j=1:a.button&4?j=2:a.button&2&&(j=3));b=c.getBoundingClientRect();var e= +l.body,s=l.documentElement,c=b.left+(window.pageXOffset||s.scrollLeft||e.scrollLeft)-(s.clientLeft||e.clientLeft||0);b=Math.round(b.top+(window.pageYOffset||s.scrollTop||e.scrollTop)-(s.clientTop||e.clientTop||0));c=Math.round(c);c=a.pageX-c;b=a.pageY-b;for(e=0;e=k&&c=u&&b=0&&h0?R(h):e.maxRowIndex!=null?e.maxRowIndex+1:0;l=l=void 0;if(typeof d.displayedColumnIndex==="undefined"){l=P(e.positionedItems,h);l=l.length>0?R(l)+1:0;c=a!=null?P(a,h):null;if(c!=null&&c.length>0){g=null;for(j=0;j0?R(a)+1:0}for(d.actualColumnIndex=l;D(e.positionedItems, +h,l);)h++}else for(;;h++){l=P(e.positionedItems,h);l=l.length>0?R(l)+1:0;if(l<=d.actualColumnIndex)break}d.actualRowIndex=h}else if(typeof d.displayedColumnIndex==="undefined"){a=I(e.positionedItems);d.actualColumnIndex=a.length>0?R(a)+1:0}e.positionedItems.push(d);if(e.maxRowIndex==null||d.actualRowIndex>e.maxRowIndex)e.maxRowIndex=d.actualRowIndex}},P=function(b,f){for(var d=[],e=0;e0?"auto":d.itemHeight+"px";else{var a=b.clientHeight-2;a<0&&(a=0);e=a+"px";if(a0?"auto":d.itemHeight+"px"}b.isContentHeightInitialized= +true}return e},w=function(b,f){var d=b.createElement("span");d.innerHTML=f;return d},y=function(b){return Math.ceil(b/36E5*1E4/100)/100+"h"},C=function(b,f){for(var d=0,e=0;e0)for(var l=0;l0){d= +true;for(e=0;e0;)b.removeChild(b.childNodes[e]);if(typeof f.isShapeVisible==="undefined"||f.isShapeVisible){e=d.taskEventTemplate;if(typeof f.taskEventTemplate!=="undefined")e=f.taskEventTemplate;e=e(f);b.appendChild(e);if(typeof d.internalExtraTaskTemplate!=="undefined"){var a=d.internalExtraTaskTemplate(f);a!=null&&b.appendChild(a)}if(typeof d.extraTaskEventTemplate!=="undefined"){a=d.extraTaskEventTemplate(f);a!=null&&b.appendChild(a)}if(d.isTaskEventToolTipVisible){a= +d.itemTemplate;if(typeof f.template!=="undefined")a=f.template;e.appendChild(a(f))}if(typeof f.predecessors!=="undefined")for(e=0;e0;)e.chartItemArea.removeChild(e.chartItemArea.childNodes[g]);g=e.chartItemArea;var j=(h.itemWidth-h.shapeWidth)/2,s=j+h.shapeWidth,u=(h.itemHeight-h.shapeHeight)/2,k=u+h.shapeHeight,p=h.shapeHeight,m,r=c.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("x",j);r.setAttribute("y",u);r.setAttribute("width",Math.max(0,s-j-1));r.setAttribute("height",Math.max(0,k-u-1));r.setAttribute("rx",h.shapeWidth/10);r.setAttribute("ry",h.shapeHeight/ +10);m=h.shapeClass;if(typeof e.shapeClass!=="undefined")m=e.shapeClass;if(typeof m!=="undefined")r.setAttribute("class",m);else{m=h.shapeStyle;if(typeof e.shapeStyle!=="undefined")m=e.shapeStyle;typeof m!=="undefined"&&r.setAttribute("style",m)}g.appendChild(r);r=c.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("x",(j+s)/2);r.setAttribute("y",k-p*1.5/8-6);r.setAttribute("style","font-weight: bold; text-anchor: middle");p=e.displayedText;typeof p==="undefined"&&(p="");r.appendChild(c.createTextNode(p)); +g.appendChild(r);if(h.canUserRearrangeItems){c=c.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("x",j);c.setAttribute("y",u);c.setAttribute("width",Math.max(0,s-j-1));c.setAttribute("height",Math.max(0,k-u-1));c.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");g.appendChild(c);ca(c,e,l,E(e,h),G(e,h),a,h)}return g}},ba=function(b,f){return function(b,e){var a=b.pertChartView,h=typeof f!=="undefined"?f:a.settings,a=a.ownerDocument,l=a.createElementNS("http://www.w3.org/2000/svg", +"g"),c=void 0,g=void 0,j,s="M ",c=E(b,h)-2,g=G(b,h)-2,u=E(e.item,h);j=G(e.item,h);var k=E(b,h),p=G(b,h),m=Math.abs(k-u),r=Math.abs(p-j),t=h.shapeWidth+2,n=h.shapeHeight+2,q=t/2,v=n/2,o=Math.max(t,n),r=r=k?u:k))/2+q-c;g=((j<=p?j:p)+(j>=p?j:p))/2+v-g;j=s;s=a.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",j);typeof h.dependencyLineZoneClass!=="undefined"&&s.setAttribute("class",h.dependencyLineZoneClass);typeof h.dependencyLineZoneStyle!=="undefined"&&s.setAttribute("style",h.dependencyLineZoneStyle);l.appendChild(s);s=a.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",j);if(typeof e.isEffortVirtual!=="undefined"?!e.isEffortVirtual:typeof e.effort!== +"undefined"&&e.effort>0){j=h.dependencyLineClass;if(typeof e.dependencyLineClass!=="undefined")j=e.dependencyLineClass;typeof j!=="undefined"&&s.setAttribute("class",j);j=h.dependencyLineStyle;if(typeof e.dependencyLineStyle!=="undefined")j=e.dependencyLineStyle}else{j=h.virtualEffortDependencyLineClass;if(typeof e.virtualEffortDependencyLineClass!=="undefined")j=e.virtualEffortDependencyLineClass;typeof j!=="undefined"&&s.setAttribute("class",j);j=h.virtualEffortDependencyLineStyle;if(typeof e.virtualEffortDependencyLineStyle!== +"undefined")j=e.virtualEffortDependencyLineStyle}typeof j!=="undefined"&&s.setAttribute("style",j);l.appendChild(s);s=a.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("x",c);s.setAttribute("y",g-6);g=h.dependencyTextClass;if(typeof e.dependencyTextClass!=="undefined")g=e.dependencyTextClass;typeof g!=="undefined"&&s.setAttribute("class",g);h=h.dependencyTextStyle;if(typeof e.dependencyTextStyle!=="undefined")h=e.dependencyTextStyle;s.setAttribute("style",h);h=e.displayedText; +typeof h==="undefined"&&(h="");s.appendChild(a.createTextNode(h));l.appendChild(s);return l}},la=function(){return function(b,f){var d=b.pertChartView.ownerDocument,e=d.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(w(d,typeof f.content!=="undefined"?f.content:""));return e}},S=function(b,f,d,e){typeof b.pertChartView!=="undefined"&&b.pertChartView.settings.itemPropertyChangeHandler(b,f,d,e)},ca=function(b,f,d,e,a,h,l){function c(c){h.draggingItem=f;h.dragType="Position";h.style.cursor= +b.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialThumbXPosition=e;h.draggingInitialThumbYPosition=a}b.addEventListener("mousedown",function(a){if(a.button==0){c(a);a.preventDefault()}},true);b.addEventListener("touchstart",function(a){c(a.touches[0]);a.preventDefault()},true);if(typeof h.draggableItems==="undefined")h.draggableItems=[];for(var g=false,j=0;j=j.chartContentContainer.clientWidth-24){g=j.chartContentContainer.scrollLeft;j.chartContentContainer.scrollLeft=j.chartContentContainer.scrollLeft+48;g=j.chartContentContainer.scrollLeft-g;if(typeof j.draggingInitialThumbXPosition!=="undefined")j.draggingInitialThumbXPosition=j.draggingInitialThumbXPosition+g}}j=a.clientY;a=h;if(typeof a.draggingItem!=="undefined"){g=a;e=0;if(g.offsetParent){do{e=e+g.offsetTop;g=g.offsetParent}while(g)}j=j-e;if(j<24){j= +a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop-48;j=j-a.chartContentContainer.scrollTop;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition-j}else if(j>=a.chartContentContainer.clientHeight-24){j=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop+48;j=a.chartContentContainer.scrollTop-j;if(typeof a.draggingInitialThumbYPosition!== +"undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition+j}}delete h.draggingItem;h.draggingInitialThumbXPosition+c<0&&(c=-h.draggingInitialThumbXPosition);h.draggingInitialThumbYPosition+b<0&&(b=-h.draggingInitialThumbYPosition);a=f;b=(h.draggingInitialThumbYPosition+b-l.chartMargin)/(l.itemHeight+l.dependencyTextBlockWidth/l.aspectRatio);l.snapRearrangedItemsToGuidelines&&(b=Math.round(b));a.actualRowIndex=b;b=f;c=(h.draggingInitialThumbXPosition+c-l.chartMargin)/(l.itemWidth+ +l.dependencyTextBlockWidth);l.snapRearrangedItemsToGuidelines&&(c=Math.round(c));b.actualColumnIndex=c;S(f,"actualRowIndex",true,false);S(f,"actualColumnIndex",true,false);typeof f.displayedColumnIndex!=="undefined"&&delete f.displayedColumnIndex;typeof f.displayedRowIndex!=="undefined"&&delete f.displayedRowIndex;da(f,d,h.chartContent,l,false);h.draggingItem=f;h.draggingPerformed=true}};h.addEventListener("mousemove",function(a){s(a)},true);h.addEventListener("touchmove",function(a){s(a.touches[0])}, +true);var u=function(){if(!(typeof h.draggingItem==="undefined"||h.draggingItem!=f||h.dragType!="Position")){da(f,d,h.chartContent,l,true);var a=h.draggingItem;delete h.draggingItem;h.style.cursor="default";if(h.draggingPerformed){S(a,"actualColumnIndex",true,true);S(a,"actualRowIndex",true,true);delete h.draggingPerformed}}};document.addEventListener("mouseup",function(a){a.button==0&&u()},true);document.addEventListener("touchend",function(){u()},true);h.draggableItems.push(f)}},da=function(b,f, +d,e,a){var h=b.pertChartView.ownerDocument;if(a){if(typeof d.temporaryRectangle!=="undefined"){h=d.chartArea;h.removeChild(d.temporaryRectangle);delete d.temporaryRectangle}setTimeout(function(){A(b.chartItem,b,e);F(f,b);setTimeout(function(){N(d,f,e,true)},0)})}else{if(typeof d.temporaryRectangle!=="undefined")a=d.temporaryRectangle;else{a=h.createElementNS("http://www.w3.org/2000/svg","rect");a.setAttribute("x",0);a.setAttribute("y",0);a.setAttribute("width",e.shapeWidth);a.setAttribute("height", +e.shapeHeight);a.setAttribute("rx",e.shapeWidth/10);a.setAttribute("ry",e.shapeHeight/10);typeof e.temporaryThumbClass!=="undefined"&&a.setAttribute("class",e.temporaryThumbClass);a.setAttribute("style",e.temporaryThumbStyle);d.temporaryRectangle=a;h=d.chartArea;h.appendChild(a)}var h=E(b,e)+(e.itemWidth-e.shapeWidth)/2,l=G(b,e)+(e.itemHeight-e.shapeHeight)/2;a.setAttribute("transform","translate("+h+", "+l+")");setTimeout(function(){N(d,f,e,false)},0)}},N=function(b,f,d,e){var a=C(f,d),f=x(f,d); +if(e||a>b.clientWidth)b.style.width=a+"px";if(e||f>b.clientHeight)b.style.height=f+"px";b=b.chartArea;e?b.setAttribute("style","width: "+a+"px; height: "+f+"px"):b.setAttribute("style","width: "+Math.max(b.clientWidth,a)+"px; height: "+Math.max(b.clientHeight,f)+"px")},ka=function(b,f){for(var d=b.childNodes.length;d-- >0;)b.removeChild(b.childNodes[d]);b.appendChild(f)},ma=function(b,f){for(var d in f)d.indexOf("custom")!=0&&d.indexOf("description")!=0||typeof b[d]==="undefined"&&(b[d]=f[d])},ea= +function(b,f,d,e,a,h,l,c){var c={isExport:true,canUserRearrangeItems:false,isTaskEventToolTipVisible:false,isDependencyToolTipVisible:false,containerClass:c.containerClass,containerStyle:c.containerStyle,border:c.border,theme:c.theme,itemWidth:c.itemWidth,itemHeight:c.itemHeight,aspectRatio:c.aspectRatio,shapeWidth:c.shapeWidth,shapeHeight:c.shapeHeight,shapeClass:c.shapeClass,shapeStyle:c.shapeStyle,shapeCornerRadius:c.shapeCornerRadius,dependencyTextStyle:c.dependencyTextStyle,dependencyLineClass:c.dependencyLineClass, +dependencyLineStyle:c.dependencyLineStyle,virtualEffortDependencyLineClass:c.virtualEffortDependencyLineClass,virtualEffortDependencyLineStyle:c.virtualEffortDependencyLineStyle,dependencyTextBlockWidth:c.dependencyTextBlockWidth,chartMargin:0,target:c.target,timeSpanFormatter:c.timeSpanFormatter,taskEventTemplate:c.taskEventTemplate,dependencyLineTemplate:c.dependencyLineTemplate},g=C(l,c),j=x(l,c);c.chartWidth=g+"px";c.chartHeight=j+"px";var s=g+2,g=j+2,u,k,p=false;if(d!=null&&typeof d.createElement!== +"undefined")u=d;else{if(d!=null&&typeof d.focus!=="undefined")k=d;else{k=window.open("",d!=null?d:"_blank",typeof e!=="undefined"&&e&&(typeof h==="undefined"||h)?"width=320,height=100,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");p=true}u=k.document;try{for(var m=document.head.getElementsByTagName("link"),d=0;d0;){var a=f[e];if(ga(a).length==0){e=a;break a}}e=null}if(e==null)return[];d=ha(d,e);e=[];for(a=0;a0)l=l+predecessorItem.effort;if(h==null||l>=h){if(h==null||l>h){h=l;e=[]}e.push(predecessorItem)}}}}for(a=0;a0?h.predecessorItem.effort:0);l<0&&(l=0);if(d==null||l>d)d=l}}return d},ga=function(b){for(var f=[],d=b.pertChartView.items,e=0;ef)f=b[d];return f},ja=function(b,f,d){for(var e=0;ea.pertChartView.chartContentContainer.clientWidth-a.pertChartView.settings.itemWidth)a.pertChartView.chartContentContainer.scrollLeft=h-(a.pertChartView.chartContentContainer.clientWidth-a.pertChartView.settings.itemWidth);h=G(a,d);b=h-a.pertChartView.chartContentContainer.scrollTop;if(b<0)a.pertChartView.chartContentContainer.scrollTop= +h;else if(b>a.pertChartView.chartContentContainer.clientHeight-a.pertChartView.settings.itemHeight)a.pertChartView.chartContentContainer.scrollTop=h-(a.pertChartView.chartContentContainer.clientHeight-a.pertChartView.settings.itemHeight)};b.scrollToLeft=function(){b.chartContentContainer.scrollLeft=0};b.scrollToRight=function(){b.chartContentContainer.scrollLeft=b.chartContent.clientWidth};b.scrollToTop=function(){b.chartContentContainer.scrollTop=0};b.scrollToBottom=function(){b.chartContentContainer.scrollTop= +b.chartContent.clientHeight};b.getChartWidth=function(){return C(f,d)};b.getChartHeight=function(){return x(f,d)};b.getItemTop=function(a){return G(a,d)};b.getItemLeft=function(a){return E(a,d)};b.onItemPropertyChanged=S;b.initializeTasEventkDraggingThumbs=function(a,h,l,c){ca(a,h,b.items,l,c,b,b.settings)};b.exportContent=function(a,h){typeof a==="undefined"&&(a={});ea(a.title,a.preparingMessage,h,false,a.rotate,false,f,d)};b.print=function(a){typeof a==="undefined"&&(a={});ea(a.title,a.preparingMessage, +null,true,a.rotate,a.autoClose,f,d)};b.isItemCritical=function(a,h){return na(h,f).indexOf(a)>=0};b.isDependencyCritical=function(a,h){return fa(h,f).indexOf(a)>=0};b.getCriticalItems=function(a){return na(a,f)};b.getCriticalDependencies=function(a){return fa(a,f)};b.repositionEnds=function(){if(f.length!=0){for(var a=false,h=0;h1)break}if(c>1)break}}c>1&&(a=true)}h=f[0];h.displayedRowIndex=a?0.5:0;b=f[f.length-1];b.displayedRowIndex=a?0.5:0;$(h);$(b)}}};return{initialize:L,initializeItems:U,refresh:M,getDefaultStyleDefinitionTemplate:W,getDefaultTaskEventTemplate:aa,getDefaultItemTemplate:X,getDefaultDependencyLineTemplate:ba,getDefaultPredecessorItemTemplate:la,initializeTaskEventDraggingThumbs:function(b,f,d,e){f.pertChartView.initializeTaskEventDraggingThumbs(b,f,d,e)}, +defaultTimeSpanFormatter:y}}()); +void 0==DlhSoft.Controls.Pert.NetworkDiagramView&&(DlhSoft.Controls.Pert.NetworkDiagramView=function(){var L=function(a,h,b,c){var g=["DlhSoft.Controls.Pert","NetworkDiagramView","DlhSoft.ProjectData.PertChart.HTML.Controls","5","validate","Licensing"];DlhSoft[g[5]][g[4]](a,g[0],g[1],g[2],g[3],c,b);a.isInitializing=true;if(typeof a.items!=="undefined")for(c=0;c0?a.insertBefore(h,a.childNodes[0]):a.appendChild(h)}catch(c){}},0)};j.addEventListener("mousedown",f,true);d.addEventListener("mouseup",f,true);m.appendChild(j);m.chartArea=j;var r;setTimeout(function(){r=a.clientHeight},0);typeof a.heightUpdateTimer!=="undefined"&&clearInterval(a.heightUpdateTimer); +a.heightUpdateTimer=setInterval(function(){try{if(!(a.clientHeight<=0)){var c=a.clientHeight;if(c!=r){var g=J(a,h,b);k.style.height=g;r=c}}}catch(j){try{clearInterval(a.heightUpdateTimer)}catch(d){}}},100);var t=function(a,c,g,j){var f;if(b.mouseHandler||b.mouseMoveHandler&&j=="mousemove"||b.mouseDownHandler&&j=="mousedown"||b.clickHandler&&j=="click"||b.doubleClickHandler&&j=="dblclick"){var e=a.which;!e&&a.button&&(a.button&1?e=1:a.button&4?e=2:a.button&2&&(e=3));f=g.getBoundingClientRect();var u= +d.body,k=d.documentElement,g=f.left+(window.pageXOffset||k.scrollLeft||u.scrollLeft)-(k.clientLeft||u.clientLeft||0);f=Math.round(f.top+(window.pageYOffset||k.scrollTop||u.scrollTop)-(k.clientTop||u.clientTop||0));g=Math.round(g);g=a.pageX-g;f=a.pageY-f;for(u=0;u=t&&g=m&&f=0&&n0?b(j):c.maxRowIndex!=null?c.maxRowIndex+1:0;d=d=void 0;if(typeof l.displayedColumnIndex==="undefined"){d=P(c.positionedItems,j);d=d.length>0?b(d)+1:0;f=g!=null?P(g,j):null;if(f!=null&&f.length>0){e=null;for(p=0;p0?b(g)+1:0}for(l.actualColumnIndex=d;D(c.positionedItems,j,d);)j++}else for(;;j++){d=P(c.positionedItems,j);d=d.length>0?b(d)+1:0;if(d<=l.actualColumnIndex)break}l.actualRowIndex=j}else if(typeof l.displayedColumnIndex==="undefined"){g=I(c.positionedItems);l.actualColumnIndex=g.length>0?b(g)+1:0}c.positionedItems.push(l);if(c.maxRowIndex==null||l.actualRowIndex>c.maxRowIndex)c.maxRowIndex=l.actualRowIndex}},P=function(a,h){for(var b=[],c=0;c0?"auto":b.itemHeight+"px";else{var g=a.clientHeight-2;g<0&&(g=0);c=g+"px";if(g0?"auto":b.itemHeight+"px"}a.isContentHeightInitialized=true}return c},w=function(a,h){var b=a.createElement("span");b.innerHTML=h;return b},y=function(a){var h;h=a.getFullYear();var b=a.getMonth()+1;b<10&&(b="0"+b);var c=a.getDate();c<10&&(c="0"+c);h=b+"/"+c+"/"+h;b=a.getHours();b<10&&(b="0"+b.toString());a=a.getMinutes();a<10&&(a="0"+a.toString());return h+" "+b+":"+a},C=function(a){return Math.ceil(a/36E5*1E4/100)/100+"h"},x=function(a){var b=new Date(Math.floor((new Date).valueOf()/ +864E5)*864E5),d=new Date,c,g;for(g=0;g0)for(var f=0;f0){d=true;for(c=0;c0;)a.removeChild(a.childNodes[c]);if(typeof b.isShapeVisible==="undefined"||b.isShapeVisible){c=d.taskTemplate;if(typeof b.taskTemplate!=="undefined")c= +b.taskTemplate;c=c(b);a.appendChild(c);if(typeof d.internalExtraTaskTemplate!=="undefined"){var g=d.internalExtraTaskTemplate(b);g!=null&&a.appendChild(g)}if(typeof d.extraTaskTemplate!=="undefined"){g=d.extraTaskTemplate(b);g!=null&&a.appendChild(g)}if(d.isTaskToolTipVisible){g=d.itemTemplate;if(typeof b.template!=="undefined")g=b.template;c.appendChild(g(b))}if(typeof b.predecessors!=="undefined")for(c=0;c0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[b]);return a.chartItemArea},S=function(a,b,d){return function(c){var g=typeof b!=="undefined"?b:c.networkDiagramView,j=typeof d!=="undefined"?d:g.settings,f=typeof a!=="undefined"?a:g.items, +e=g.ownerDocument,k=la(c),p=(j.itemWidth-j.shapeWidth)/2,m=p+j.shapeWidth,r=(j.itemHeight-j.shapeHeight)/2,t=r+j.shapeHeight,n=0,q=j.shapeHeight,v=j.shapeWidth;if(c.isMilestone){n=v/16;p=p+n;m=m-n;v=v-2*n}if(c.isMilestone){var o=e.createElementNS("http://www.w3.org/2000/svg","polygon");o.setAttribute("points",p+","+r+" "+(p-n)+","+(r+t)/2+" "+p+","+t+" "+m+","+t+" "+(m+n)+","+(r+t)/2+" "+m+","+r);n=j.milestoneClass;if(typeof c.milestoneClass!=="undefined")n=c.milestoneClass;if(typeof n!=="undefined")o.setAttribute("class", +n);else{n=j.milestoneStyle;if(typeof c.milestoneStyle!=="undefined")n=c.milestoneStyle;typeof n!=="undefined"&&o.setAttribute("style",n)}k.appendChild(o)}o=e.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x",p);o.setAttribute("y",r);o.setAttribute("width",Math.max(0,m-p-1));o.setAttribute("height",Math.max(0,t-r-1));n=j.shapeClass;if(typeof c.shapeClass!=="undefined")n=c.shapeClass;if(typeof n!=="undefined")o.setAttribute("class",n);else{n=j.shapeStyle;if(typeof c.shapeStyle!== +"undefined")n=c.shapeStyle;typeof n!=="undefined"&&o.setAttribute("style",n)}k.appendChild(o);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p);n.setAttribute("y1",r+q*3/8);n.setAttribute("x2",m-1);n.setAttribute("y2",r+q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n); +n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p);n.setAttribute("y1",t-q*3/8);n.setAttribute("x2",m-1);n.setAttribute("y2",t-q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p+v*3/8);n.setAttribute("y1", +r);n.setAttribute("x2",p+v*3/8);n.setAttribute("y2",r+q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",m-v*3/8);n.setAttribute("y1",r);n.setAttribute("x2",m-v*3/8);n.setAttribute("y2",r+q*3/8);o=j.shapeClass;if(typeof c.shapeClass!== +"undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p+v*3/8);n.setAttribute("y1",t);n.setAttribute("x2",p+v*3/8);n.setAttribute("y2",t-q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle; +if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",m-v*3/8);n.setAttribute("y1",t);n.setAttribute("x2",m-v*3/8);n.setAttribute("y2",t-q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style", +o);k.appendChild(n);o=e.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("x",(p+m)/2);o.setAttribute("y",t-q*3/8-6);o.setAttribute("style","font-weight: bold; text-anchor: middle");n=c.displayedText;typeof n==="undefined"&&(n="");o.appendChild(e.createTextNode(n));k.appendChild(o);var n=function(a){var a=j.dateTimeFormatter(new Date(a.valueOf()+(new Date).getTimezoneOffset()*6E4)),b;b=a.indexOf(" ");if(b>=0){value1=a.substr(0,b);value2=a.substr(b+1)}else{value1=a;value2=""}return[value1, +value2]},o=n(c.earlyStart),z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",p+v*3/8/2);z.setAttribute("y",t-q*5/8-20);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[0]));k.appendChild(z);z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",p+v*3/8/2);z.setAttribute("y",t-q*5/8-4);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[1]));k.appendChild(z);o=j.timeSpanFormatter(c.effort);z=e.createElementNS("http://www.w3.org/2000/svg", +"text");z.setAttribute("x",(p+m)/2);z.setAttribute("y",t-q*5/8-12);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o));k.appendChild(z);o=n(c.earlyFinish);z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",m-v*3/8/2);z.setAttribute("y",t-q*5/8-20);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[0]));k.appendChild(z);z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",m-v*3/8/2);z.setAttribute("y", +t-q*5/8-4);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[1]));k.appendChild(z);o=n(c.lateStart);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",p+v*3/8/2);q.setAttribute("y",t-20);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[0]));k.appendChild(q);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",p+v*3/8/2);q.setAttribute("y",t-4);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[1])); +k.appendChild(q);o=j.timeSpanFormatter(c.slack);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",(p+m)/2);q.setAttribute("y",t-12);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o));k.appendChild(q);o=n(c.lateFinish);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",m-v*3/8/2);q.setAttribute("y",t-20);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[0]));k.appendChild(q);q=e.createElementNS("http://www.w3.org/2000/svg", +"text");q.setAttribute("x",m-v*3/8/2);q.setAttribute("y",t-4);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[1]));k.appendChild(q);if(j.canUserRearrangeItems){e=e.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",p);e.setAttribute("y",r);e.setAttribute("width",Math.max(0,m-p-1));e.setAttribute("height",Math.max(0,t-r-1));e.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(e);ka(e,c,f,F(c,j),H(c,j),g,j)}return k}}, +ca=function(a,b){return function(a,c){var g=a.networkDiagramView,d=typeof b!=="undefined"?b:g.settings,e=g.ownerDocument,g=e.createElementNS("http://www.w3.org/2000/svg","g"),f;f="M ";var k=F(a,d)-2,p=H(a,d)-2,m=F(c.item,d),r=H(c.item,d),t=F(a,d),n=H(a,d),q=Math.abs(t-m),v=Math.abs(n-r),o=d.shapeWidth+2,z=d.shapeHeight+2,y=o/2,x=z/2,w=Math.max(o,z),v=v=k.chartContentContainer.clientWidth-24){f=k.chartContentContainer.scrollLeft;k.chartContentContainer.scrollLeft=k.chartContentContainer.scrollLeft+48;f=k.chartContentContainer.scrollLeft-f;if(typeof k.draggingInitialThumbXPosition!== +"undefined")k.draggingInitialThumbXPosition=k.draggingInitialThumbXPosition+f}}k=a.clientY;a=j;if(typeof a.draggingItem!=="undefined"){f=a;m=0;if(f.offsetParent){do{m=m+f.offsetTop;f=f.offsetParent}while(f)}k=k-m;if(k<24){k=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop-48;k=k-a.chartContentContainer.scrollTop;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition-k}else if(k>=a.chartContentContainer.clientHeight- +24){k=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop+48;k=a.chartContentContainer.scrollTop-k;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition+k}}delete j.draggingItem;j.draggingInitialThumbXPosition+c<0&&(c=-j.draggingInitialThumbXPosition);j.draggingInitialThumbYPosition+g<0&&(g=-j.draggingInitialThumbYPosition);a=b;g=(j.draggingInitialThumbYPosition+g-e.diagramMargin)/(e.itemHeight+ +e.minDependencyLineLength/e.aspectRatio);e.snapRearrangedItemsToGuidelines&&(g=Math.round(g));a.actualRowIndex=g;g=b;c=(j.draggingInitialThumbXPosition+c-e.diagramMargin)/(e.itemWidth+e.minDependencyLineLength);e.snapRearrangedItemsToGuidelines&&(c=Math.round(c));g.actualColumnIndex=c;N(b,"actualRowIndex",true,false);N(b,"actualColumnIndex",true,false);typeof b.displayedColumnIndex!=="undefined"&&delete b.displayedColumnIndex;typeof b.displayedRowIndex!=="undefined"&&delete b.displayedRowIndex;ma(b, +d,j.chartContent,e,false);j.draggingItem=b;j.draggingPerformed=true}};j.addEventListener("mousemove",function(a){m(a)},true);j.addEventListener("touchmove",function(a){m(a.touches[0])},true);var r=function(){if(!(typeof j.draggingItem==="undefined"||j.draggingItem!=b||j.dragType!="Position")){ma(b,d,j.chartContent,e,true);var a=j.draggingItem;delete j.draggingItem;j.style.cursor="default";if(j.draggingPerformed){N(a,"actualColumnIndex",true,true);N(a,"actualRowIndex",true,true);delete j.draggingPerformed}}}; +document.addEventListener("mouseup",function(a){a.button==0&&r()},true);document.addEventListener("touchend",function(){r()},true);j.draggableItems.push(b)}},ma=function(a,b,d,c,g){var e=a.networkDiagramView.ownerDocument;if(g){if(typeof d.temporaryRectangle!=="undefined"){e=d.chartArea;e.removeChild(d.temporaryRectangle);delete d.temporaryRectangle}setTimeout(function(){Q(a.chartItem,a,c);A(b,a);setTimeout(function(){ea(d,b,c,true)},0)})}else{if(typeof d.temporaryRectangle!=="undefined")g=d.temporaryRectangle; +else{g=e.createElementNS("http://www.w3.org/2000/svg","rect");g.setAttribute("x",0);g.setAttribute("y",0);g.setAttribute("width",c.shapeWidth);g.setAttribute("height",c.shapeHeight);typeof c.temporaryThumbClass!=="undefined"&&g.setAttribute("class",c.temporaryThumbClass);g.setAttribute("style",c.temporaryThumbStyle);d.temporaryRectangle=g;e=d.chartArea;e.appendChild(g)}var e=F(a,c)+(c.itemWidth-c.shapeWidth)/2,f=H(a,c)+(c.itemHeight-c.shapeHeight)/2;g.setAttribute("transform","translate("+e+", "+ +f+")");setTimeout(function(){ea(d,b,c,false)},0)}},ea=function(a,b,d,c){var g=K(b,d),b=E(b,d);if(c||g>a.clientWidth)a.style.width=g+"px";if(c||b>a.clientHeight)a.style.height=b+"px";a=a.chartArea;c?a.setAttribute("style","width: "+g+"px; height: "+b+"px"):a.setAttribute("style","width: "+Math.max(a.clientWidth,g)+"px; height: "+Math.max(a.clientHeight,b)+"px")},na=function(a,b){for(var d=a.childNodes.length;d-- >0;)a.removeChild(a.childNodes[d]);a.appendChild(b)},fa=function(a,b){for(var d in b)d.indexOf("custom")!= +0&&d.indexOf("description")!=0||typeof a[d]==="undefined"&&(a[d]=b[d])},ha=function(a,b,d,c,g,e,f,u,k){var d={isExport:true,canUserRearrangeItems:false,isTaskToolTipVisible:false,isDependencyToolTipVisible:false,containerClass:k.containerClass,containerStyle:k.containerStyle,border:k.border,theme:k.theme,itemWidth:k.itemWidth,itemHeight:k.itemHeight,aspectRatio:k.aspectRatio,shapeWidth:k.shapeWidth,shapeHeight:k.shapeHeight,shapeClass:k.shapeClass,milestoneClass:k.milestoneClass,shapeStyle:k.shapeStyle, +milestoneStyle:k.milestoneStyle,dependencyLineClass:k.dependencyLineClass,dependencyLineStyle:k.dependencyLineStyle,minDependencyLineLength:k.minDependencyLineLength,diagramMargin:0,target:k.target,dateTimeFormatter:k.dateTimeFormatter,timeSpanFormatter:k.timeSpanFormatter,isRelativeToTimezone:k.isRelativeToTimezone,taskTemplate:k.taskTemplate,dependencyLineTemplate:k.dependencyLineTemplate},k=K(u,d),p=E(u,d);d.chartWidth=k+"px";d.chartHeight=p+"px";var m=k+2,k=p+2,r,t,n=false;if(c!=null&&typeof c.createElement!== +"undefined")r=c;else{if(c!=null&&typeof c.focus!=="undefined")t=c;else{t=window.open("",c!=null?c:"_blank",typeof g!=="undefined"&&g&&(typeof f==="undefined"||f)?"width=320,height=100,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");n=true}r=t.document;try{for(var q=document.head.getElementsByTagName("link"),c=0;c +0;){g=b[c];if(ja(g).length==0)break a}g=null}if(g==null)return[];c=[d];d=ga(d,g);for(g=0;g=0&&c.push(u)}}return c},ga=function(a,b){if(a==null||b==null||a==b||typeof b.predecessors==="undefined")return[];var d=[],c=[],g,e=null;for(g=0;g0&&(f=f+predecessorItem.item.effort);if(e==null||f>=e){if(e==null||f>e){e=f;c=[]}c.push(predecessorItem)}}}}for(g=0;g0?e.predecessorItem.item.effort:0);f<0&&(f=0);if(d==null||f>d)d=f}}return d},ja=function(a){for(var b=[],d=a.networkDiagramView.items,c=0;cb)b=a[d];return b},f=function(a){return typeof a!=="undefined"?new Date(a.valueOf()+a.getTimezoneOffset()*6E4):a},d=function(a){return typeof a!=="undefined"?new Date(a.valueOf()-a.getTimezoneOffset()*6E4):a},e=function(a,b,e){for(var c=0;ca.networkDiagramView.chartContentContainer.clientWidth-a.networkDiagramView.settings.itemWidth)a.networkDiagramView.chartContentContainer.scrollLeft=b-(a.networkDiagramView.chartContentContainer.clientWidth-a.networkDiagramView.settings.itemWidth); +b=H(a,e);c=b-a.networkDiagramView.chartContentContainer.scrollTop;if(c<0)a.networkDiagramView.chartContentContainer.scrollTop=b;else if(c>a.networkDiagramView.chartContentContainer.clientHeight-a.networkDiagramView.settings.itemHeight)a.networkDiagramView.chartContentContainer.scrollTop=b-(a.networkDiagramView.chartContentContainer.clientHeight-a.networkDiagramView.settings.itemHeight)};a.scrollToLeft=function(){a.chartContentContainer.scrollLeft=0};a.scrollToRight=function(){a.chartContentContainer.scrollLeft= +a.chartContent.clientWidth};a.scrollToTop=function(){a.chartContentContainer.scrollTop=0};a.scrollToBottom=function(){a.chartContentContainer.scrollTop=a.chartContent.clientHeight};a.getChartWidth=function(){return K(b,e)};a.getChartHeight=function(){return E(b,e)};a.getItemTop=function(a){return H(a,e)};a.getItemLeft=function(a){return F(a,e)};a.onItemPropertyChanged=N;a.initializeTaskDraggingThumbs=function(b,c,d,e){ka(b,c,a.items,d,e,a,a.settings)};a.exportContent=function(a,c){typeof a==="undefined"&& +(a={});ha(a.title,a.preparingMessage,a.isRelativeToTimezone,c,false,a.rotate,false,b,e)};a.print=function(a){typeof a==="undefined"&&(a={});ha(a.title,a.preparingMessage,a.isRelativeToTimezone,null,true,a.rotate,a.autoClose,b,e)};a.isItemCritical=function(a,c){return Y(c,b).indexOf(a)>=0};a.isDependencyCritical=function(a,c){return ia(c,b).indexOf(a)>=0};a.getCriticalItems=function(a){return Y(a,b)};a.getCriticalDependencies=function(a){return ia(a,b)};a.repositionEnds=function(){if(b.length!=0){for(var a= +false,c=0;c1)break}if(e>1)break}}e>1&&(a=true)}c=b[0];c.displayedRowIndex=a?0.5:0;d=b[b.length-1];d.displayedRowIndex=a?0.5:0;X(c);X(d)}};a.getOutputDate=f;a.getInputDate=d};return{initialize:L,initializeItems:U,refresh:M,getDefaultStyleDefinitionTemplate:aa,getDefaultTaskTemplate:S, +getDefaultItemTemplate:ba,getDefaultDependencyLineTemplate:ca,getDefaultPredecessorItemTemplate:da,initializeTaskDraggingThumbs:function(a,b,d,c){b.networkDiagramView.initializeTaskDraggingThumbs(a,b,d,c)},defaultDateTimeFormatter:function(a){return y(new Date(a.valueOf()+(new Date).getTimezoneOffset()*6E4))},defaultTimeSpanFormatter:C,getOutputDate:f,getInputDate:d}}()); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.React.Components.jsx b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.React.Components.jsx new file mode 100644 index 000000000..f1a3805e4 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.React.Components.jsx @@ -0,0 +1,36 @@ +import React from 'react'; +const DlhSoft = window.DlhSoft; + +export var PertChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.Pert.PertChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); + +export var NetworkDiagramView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.Pert.NetworkDiagramView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Vue.Components.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Vue.Components.js new file mode 100644 index 000000000..f28998951 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.ProjectData.PertChart.Vue.Components.js @@ -0,0 +1,29 @@ +Vue.component('pert-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.PertChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); + +Vue.component('network-diagram', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.NetworkDiagramView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.d.ts new file mode 100644 index 000000000..2e92d969e --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.d.ts @@ -0,0 +1,167 @@ + /** @namespace System */ + + /** + * @memberof System + * @callback System.Action + * @return {void} + */ + + /** @namespace System.ComponentModel */ + + /** + * @memberof System.ComponentModel + * @callback System.ComponentModel.PropertyChangedEventHandler + * @param {Object} sender + * @param {System.ComponentModel.PropertyChangedEventArgs} e + * @return {void} + */ + +/// + +declare module DlhSoft.UndoManagementLibrary { + /** @namespace DlhSoft.UndoManagementLibrary */ + + /** + * Provides support for recording (or executing and automatically recording) and undoing or redoing actions. + * + * @public + * @class DlhSoft.UndoManagementLibrary.UndoStack + * @implements System.ComponentModel.INotifyPropertyChanged + */ + export interface UndoStack extends System.ComponentModel.INotifyPropertyChanged { + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function addPropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + addPropertyChanged(value: {(sender: Object, e: System.ComponentModel.PropertyChangedEventArgs): void}): void; + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function removePropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + removePropertyChanged(value: {(sender: Object, e: System.ComponentModel.PropertyChangedEventArgs): void}): void; + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanUndo + * @return {boolean} + */ + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @function setCanUndo + */ + getCanUndo(): boolean; + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanRedo + * @return {boolean} + */ + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @function setCanRedo + */ + getCanRedo(): boolean; + /** + * Records an already executed action to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatWasDone + * @param {System.Action} howToUndo + * @param {?number} whenWasDone + * @return {void} + */ + record(whatWasDone: {(): void}, howToUndo: {(): void}, whenWasDone?: number): void; + /** + * Executes an action and records it to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatToDo + * @param {System.Action} howToUndo + * @return {void} + */ + doAndRecord(whatToDo: {(): void}, howToUndo: {(): void}): void; + /** + * Undoes the last completed action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + undo(relatedActionSpan?: number): void; + /** + * Redoes the last undone action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + redo(relatedActionSpan?: number): void; + /** + * Raises PropertyChanged event. + * + * @instance + * @protected + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {string} propertyName + * @return {void} + */ + onPropertyChanged(propertyName: string): void; + } + export interface UndoStackFunc extends Function { + prototype: UndoStack; + ActionRecord: UndoStack.ActionRecordFunc; + new (): UndoStack; + } + var UndoStack: UndoStackFunc; + module UndoStack { + export interface ActionRecord { + whatWasDone: {(): void}; + howToUndo: {(): void}; + whenWasDone: number; + } + export interface ActionRecordFunc extends Function { + prototype: ActionRecord; + new (): ActionRecord; + } + } + +} \ No newline at end of file diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.js new file mode 100644 index 000000000..2c7d71af0 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.js @@ -0,0 +1,251 @@ +/** + * @version 1.0.0.0 + * @copyright Copyright © DlhSoft 2017 + * @compiler Bridge.NET 15.7.0 + */ +Bridge.assembly("DlhSoft.UndoManagementLibrary", function ($asm, globals) { + "use strict"; + + /** @namespace System */ + + /** + * @memberof System + * @callback System.Action + * @return {void} + */ + + /** @namespace System.ComponentModel */ + + /** + * @memberof System.ComponentModel + * @callback System.ComponentModel.PropertyChangedEventHandler + * @param {Object} sender + * @param {System.ComponentModel.PropertyChangedEventArgs} e + * @return {void} + */ + + /** @namespace DlhSoft.UndoManagementLibrary */ + + /** + * Provides support for recording (or executing and automatically recording) and undoing or redoing actions. + * + * @public + * @class DlhSoft.UndoManagementLibrary.UndoStack + * @implements System.ComponentModel.INotifyPropertyChanged + */ + Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack", { + inherits: [System.ComponentModel.INotifyPropertyChanged], + completedActions: null, + undoneActions: null, + config: { + events: { + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function addPropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function removePropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + PropertyChanged: null + }, + alias: [ + "addPropertyChanged", "System$ComponentModel$INotifyPropertyChanged$addPropertyChanged", + "removePropertyChanged", "System$ComponentModel$INotifyPropertyChanged$removePropertyChanged" + ], + init: function () { + this.completedActions = new (System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord))(); + this.undoneActions = new (System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord))(); + } + }, + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanUndo + * @return {boolean} + */ + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @function setCanUndo + */ + getCanUndo: function () { + return System.Linq.Enumerable.from(this.completedActions).any(); + }, + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanRedo + * @return {boolean} + */ + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @function setCanRedo + */ + getCanRedo: function () { + return System.Linq.Enumerable.from(this.undoneActions).any(); + }, + /** + * Records an already executed action to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatWasDone + * @param {System.Action} howToUndo + * @param {?number} whenWasDone + * @return {void} + */ + record: function (whatWasDone, howToUndo, whenWasDone) { + var $t; + if (whenWasDone === void 0) { whenWasDone = null; } + var originallyCanUndo = this.getCanUndo(); + var originallyCanRedo = this.getCanRedo(); + this.undoneActions.clear(); + this.completedActions.insert(0, Bridge.merge(new DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord(), { + whatWasDone: whatWasDone, + howToUndo: howToUndo, + whenWasDone: ($t = whenWasDone, $t != null ? $t : System.Int64.clip32(System.Int64((new Date()).getTime()).mul(10000).div(System.Int64(10000)))) + } )); + if (!originallyCanUndo) { + this.onPropertyChanged("canUndo"); + } + if (originallyCanRedo) { + this.onPropertyChanged("canRedo"); + } + }, + /** + * Executes an action and records it to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatToDo + * @param {System.Action} howToUndo + * @return {void} + */ + doAndRecord: function (whatToDo, howToUndo) { + var now = new Date(); + whatToDo(); + this.record(whatToDo, howToUndo, System.Int64.clip32(System.Int64((now).getTime()).mul(10000).div(System.Int64(10000)))); + }, + /** + * Undoes the last completed action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + undo: function (relatedActionSpan) { + if (relatedActionSpan === void 0) { relatedActionSpan = null; } + if (!this.getCanUndo()) { + return; + } + if (relatedActionSpan == null) { + relatedActionSpan = 0; + } + var originallyCanRedo = this.getCanRedo(); + while (true) { + var lastCompletedAction = System.Linq.Enumerable.from(this.completedActions).first(); + this.completedActions.removeAt(0); + lastCompletedAction.howToUndo(); + this.undoneActions.insert(0, lastCompletedAction); + var previouslyCompletedAction = System.Linq.Enumerable.from(this.completedActions).firstOrDefault(null, null); + if (previouslyCompletedAction == null || System.Nullable.gt(Bridge.Int.clip32(lastCompletedAction.whenWasDone - previouslyCompletedAction.whenWasDone), relatedActionSpan)) { + break; + } + } + if (!this.getCanUndo()) { + this.onPropertyChanged("canUndo"); + } + if (!originallyCanRedo) { + this.onPropertyChanged("canRedo"); + } + }, + /** + * Redoes the last undone action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + redo: function (relatedActionSpan) { + if (relatedActionSpan === void 0) { relatedActionSpan = null; } + if (!this.getCanRedo()) { + return; + } + if (relatedActionSpan == null) { + relatedActionSpan = 0; + } + var originallyCanUndo = this.getCanUndo(); + while (true) { + var lastUndoneAction = System.Linq.Enumerable.from(this.undoneActions).first(); + this.undoneActions.removeAt(0); + lastUndoneAction.whatWasDone(); + this.completedActions.insert(0, lastUndoneAction); + var previouslyUndoneAction = System.Linq.Enumerable.from(this.undoneActions).firstOrDefault(null, null); + if (previouslyUndoneAction == null || System.Nullable.gt(Bridge.Int.clip32(previouslyUndoneAction.whenWasDone - lastUndoneAction.whenWasDone), relatedActionSpan)) { + break; + } + } + if (!this.getCanRedo()) { + this.onPropertyChanged("canRedo"); + } + if (!originallyCanUndo) { + this.onPropertyChanged("canUndo"); + } + }, + /** + * Raises PropertyChanged event. + * + * @instance + * @protected + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {string} propertyName + * @return {void} + */ + onPropertyChanged: function (propertyName) { + !Bridge.staticEquals(this.PropertyChanged, null) ? this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)) : null; + } + }); + + Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord", { + whatWasDone: null, + howToUndo: null, + whenWasDone: 0 + }); +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.min.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.min.js new file mode 100644 index 000000000..72bb0062e --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/DlhSoft.UndoManagementLibrary.min.js @@ -0,0 +1 @@ +Bridge.assembly("DlhSoft.UndoManagementLibrary",function(){"use strict";Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack",{inherits:[System.ComponentModel.INotifyPropertyChanged],completedActions:null,undoneActions:null,config:{events:{PropertyChanged:null},alias:["addPropertyChanged","System$ComponentModel$INotifyPropertyChanged$addPropertyChanged","removePropertyChanged","System$ComponentModel$INotifyPropertyChanged$removePropertyChanged"],init:function(){this.completedActions=new(System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord));this.undoneActions=new(System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord))}},getCanUndo:function(){return System.Linq.Enumerable.from(this.completedActions).any()},getCanRedo:function(){return System.Linq.Enumerable.from(this.undoneActions).any()},record:function(whatWasDone,howToUndo,whenWasDone){var $t,originallyCanUndo,originallyCanRedo;if(whenWasDone===void 0&&(whenWasDone=null),originallyCanUndo=this.getCanUndo(),originallyCanRedo=this.getCanRedo(),this.undoneActions.clear(),this.completedActions.insert(0,Bridge.merge(new DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord,{whatWasDone:whatWasDone,howToUndo:howToUndo,whenWasDone:($t=whenWasDone,$t!=null?$t:System.Int64.clip32(System.Int64((new Date).getTime()).mul(1e4).div(System.Int64(1e4))))})),!originallyCanUndo)this.onPropertyChanged("canUndo");if(originallyCanRedo)this.onPropertyChanged("canRedo")},doAndRecord:function(whatToDo,howToUndo){var now=new Date;whatToDo();this.record(whatToDo,howToUndo,System.Int64.clip32(System.Int64(now.getTime()).mul(1e4).div(System.Int64(1e4))))},undo:function(relatedActionSpan){var originallyCanRedo,lastCompletedAction,previouslyCompletedAction;if(relatedActionSpan===void 0&&(relatedActionSpan=null),this.getCanUndo()){for(relatedActionSpan==null&&(relatedActionSpan=0),originallyCanRedo=this.getCanRedo();;)if(lastCompletedAction=System.Linq.Enumerable.from(this.completedActions).first(),this.completedActions.removeAt(0),lastCompletedAction.howToUndo(),this.undoneActions.insert(0,lastCompletedAction),previouslyCompletedAction=System.Linq.Enumerable.from(this.completedActions).firstOrDefault(null,null),previouslyCompletedAction==null||System.Nullable.gt(Bridge.Int.clip32(lastCompletedAction.whenWasDone-previouslyCompletedAction.whenWasDone),relatedActionSpan))break;if(!this.getCanUndo())this.onPropertyChanged("canUndo");if(!originallyCanRedo)this.onPropertyChanged("canRedo")}},redo:function(relatedActionSpan){var originallyCanUndo,lastUndoneAction,previouslyUndoneAction;if(relatedActionSpan===void 0&&(relatedActionSpan=null),this.getCanRedo()){for(relatedActionSpan==null&&(relatedActionSpan=0),originallyCanUndo=this.getCanUndo();;)if(lastUndoneAction=System.Linq.Enumerable.from(this.undoneActions).first(),this.undoneActions.removeAt(0),lastUndoneAction.whatWasDone(),this.completedActions.insert(0,lastUndoneAction),previouslyUndoneAction=System.Linq.Enumerable.from(this.undoneActions).firstOrDefault(null,null),previouslyUndoneAction==null||System.Nullable.gt(Bridge.Int.clip32(previouslyUndoneAction.whenWasDone-lastUndoneAction.whenWasDone),relatedActionSpan))break;if(!this.getCanRedo())this.onPropertyChanged("canRedo");if(!originallyCanUndo)this.onPropertyChanged("canUndo")}},onPropertyChanged:function(propertyName){Bridge.staticEquals(this.PropertyChanged,null)?null:this.PropertyChanged(this,new System.ComponentModel.PropertyChangedEventArgs(propertyName))}});Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord",{whatWasDone:null,howToUndo:null,whenWasDone:0})}); \ No newline at end of file diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/bridge.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/bridge.d.ts new file mode 100644 index 000000000..753de0b13 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/bridge.d.ts @@ -0,0 +1,972 @@ +/* + * @version : 15.7.0 - Bridge.NET + * @author : Object.NET, Inc. http://bridge.net/ + * @date : 2017-01-16 + * @copyright : Copyright 2008-2017 Object.NET, Inc. http://object.net/ + * @license : See license.txt and https://github.com/bridgedotnet/Bridge.NET/blob/master/LICENSE. + */ +declare module Bridge { + export function global(): T; + export function emptyFn(): Function; + export function property(scope: any, name: string, defaultValue: any): void; + export function event(scope: any, name: string, defaultValue: any): void; + export function copy(to: T, from: T, keys: string[], toIf?: boolean): T; + export function copy(to: T, from: T, keys: string, toIf?: boolean): T; + export function ns(ns: string, scope?: any): any; + export function ready(fn: { (): void }): void; + export function on(event: string, el: HTMLElement, fn: Function): void; + export function getHashCode(value: any, safe: boolean): number; + export function getDefaultValue(type: { prototype: T }): T; + export function getTypeName(obj: any): string; + export function is(obj: any, type: any, ignoreFn?: boolean): boolean; + export function as(obj: any, type: { prototype: T }): T; + export function cast(obj: any, type: { prototype: T }): T; + export function apply(obj: T, values: any): T; + export function merge(to: T, from: T): T; + export function getEnumerator(obj: any): System.Collections.IEnumerator; + export function getPropertyNames(obj: any, includeFunctions?: boolean): string[]; + export function isDefined(value: any, noNull?: boolean): boolean; + export function isEmpty(value: any, allowEmpty?: boolean): boolean; + export function toArray(ienumerable: any[]): any[]; + export function toArray(ienumerable: T[]): T[]; + export function toArray(ienumerable: any): T[]; + export function isArray(obj: any): boolean; + export function isFunction(obj: any): boolean; + export function isDate(obj: any): boolean; + export function isNull(obj: any): boolean; + export function isBoolean(obj: any): boolean; + export function isNumber(obj: any): boolean; + export function isString(obj: any): boolean; + export function unroll(value: string): any; + export function equals(a: any, b: any): boolean; + export function objectEquals(a: any, b: any): boolean; + export function deepEquals(a: any, b: any): boolean; + export function compare(a: any, b: any, safe?: boolean): boolean; + export function equalsT(a: any, b: any): boolean; + export function format(obj: any, formatString?: string): string; + export function getType(instance: any): any; + export function isLower(c: number): boolean; + export function isUpper(c: number): boolean; + + export interface fnMethods { + call(obj: any, fnName: string): any; + bind(obj: any, method: Function, args?: any[], appendArgs?: boolean): Function; + bindScope(obj: any, method: Function): Function; + combine(fn1: Function, fn2: Function): Function; + remove(fn1: Function, fn2: Function): Function; + } + + var fn: fnMethods; + + export interface Array { + get(arr: any[], indices: number[]): any; + set(arr: any[], indices: number[], value: any); + getLength(arr: any[], dimension: number): number; + getRank(arr: any[]): number; + create(defValue: any, initValues: any[], sizes: number[]): any[]; + toEnumerable(array: any[]): System.Collections.IEnumerable; + toEnumerable(array: T[]): System.Collections.Generic.IEnumerable$1; + toEnumerator(array: any[]): System.Collections.IEnumerator; + toEnumerator(array: T[]): System.Collections.Generic.IEnumerator$1; + } + + var Array: Array; + + export interface String { + isNullOrWhiteSpace(value: string): boolean; + isNullOrEmpty(value: string): boolean; + fromCharCount(c: number, count: number): string; + format(str: string, ...args: any[]): string; + alignString(str: string, alignment: number, pad: string, dir: number): string; + startsWith(str: string, prefix: string): boolean; + endsWith(str: string, suffix: string): boolean; + contains(str: string, value: string): string; + indexOfAny(str: string, anyOf: number[], startIndex?: number, length?: number): number; + indexOf(str: string, value: string): number; + compare(strA: string, strB: string): number; + toCharArray(str: string, startIndex: number, length: number): number[]; + } + + var String: String; + + export interface Class { + define(className: string, props: any): Function; + define(className: string, scope: any, props: any): Function; + generic(className: string, props: any): Function; + generic(className: string, scope: any, props: any): Function; + } + + var Class: Class; + export function define(className: string, props: any): Function; + export function define(className: string, scope: any, props: any): Function; + + export class ErrorException extends System.Exception { + constructor(error: Error); + getError(): Error; + } + + export interface IPromise { + then(fulfilledHandler: Function, errorHandler?: Function): void; + } + var IPromise: Function; + + export interface Int extends System.IComparable$1, System.IEquatable$1 { + instanceOf(instance): boolean; + getDefaultValue(): number; + format(num: number, format?: string, provider?: System.Globalization.NumberFormatInfo): string; + parseFloat(str: string, provider?: System.Globalization.NumberFormatInfo): number; + tryParseFloat(str: string, provider: System.Globalization.NumberFormatInfo, result: { v: number }): boolean; + parseInt(str: string, min?: number, max?: number, radix?: number): number; + tryParseInt(str: string, result: { v: number }, min?: number, max?: number, radix?: number): boolean; + trunc(num: number): number; + div(x: number, y: number): number; + } + var Int: Int; + + export interface Browser { + isStrict: boolean; + isIEQuirks: boolean; + isOpera: boolean; + isOpera10_5: boolean; + isWebKit: boolean; + isChrome: boolean; + isSafari: boolean; + isSafari3: boolean; + isSafari4: boolean; + isSafari5: boolean; + isSafari5_0: boolean; + isSafari2: boolean; + isIE: boolean; + isIE6: boolean; + isIE7: boolean; + isIE7m: boolean; + isIE7p: boolean; + isIE8: boolean; + isIE8m: boolean; + isIE8p: boolean; + isIE9: boolean; + isIE9m: boolean; + isIE9p: boolean; + isIE10: boolean; + isIE10m: boolean; + isIE10p: boolean; + isIE11: boolean; + isIE11m: boolean; + isIE11p: boolean; + isGecko: boolean; + isGecko3: boolean; + isGecko4: boolean; + isGecko5: boolean; + isGecko10: boolean; + isFF3_0: boolean; + isFF3_5: boolean; + isFF3_6: boolean; + isFF4: boolean; + isFF5: boolean; + isFF10: boolean; + isLinux: boolean; + isWindows: boolean; + isMac: boolean; + chromeVersion: number; + firefoxVersion: number; + ieVersion: number; + operaVersion: number; + safariVersion: number; + webKitVersion: number; + isSecure: boolean; + isiPhone: boolean; + isiPod: boolean; + isiPad: boolean; + isBlackberry: boolean; + isAndroid: boolean; + isDesktop: boolean; + isTablet: boolean; + isPhone: boolean; + iOS: boolean; + standalone: boolean; + } + + var Browser: Browser; + + export class CustomEnumerator implements System.Collections.IEnumerator { + constructor(moveNext: Function, getCurrent: Function, reset?: Function, dispose?: Function, scope?: any); + moveNext(): boolean; + getCurrent(): any; + reset(): void; + dispose(): void; + } + + export class ArrayEnumerator implements System.Collections.IEnumerator { + constructor(array: any[]); + moveNext(): boolean; + getCurrent(): any; + reset(): void; + dispose(): void; + } + + export class ArrayEnumerable implements System.Collections.IEnumerable { + constructor(array: any[]); + getEnumerator(): ArrayEnumerator; + } + + export interface Validation { + isNull(value: any): boolean; + isEmpty(value: any): boolean; + isNotEmptyOrWhitespace(value: any): boolean; + isNotNull(value: any): boolean; + isNotEmpty(value: any): boolean; + email(value: string): boolean; + url(value: string): boolean; + alpha(value: string): boolean; + alphaNum(value: string): boolean; + creditCard(value: string, type: string): boolean; + } + + var Validation: Validation; +} + +declare module System { + export class Attribute { + } + + export interface Nullable { + hasValue(obj: any): boolean; + getValue(obj: T): T; + getValue(obj: any): any; + getValueOrDefault(obj: T, defValue: T): T; + add(a: number, b: number): number; + band(a: number, b: number): number; + bor(a: number, b: number): number; + and(a: boolean, b: boolean): boolean; + or(a: boolean, b: boolean): boolean; + div(a: number, b: number): number; + eq(a: any, b: any): boolean; + xor(a: number, b: number): number; + gt(a: any, b: any): boolean; + gte(a: any, b: any): boolean; + neq(a: any, b: any): boolean; + lt(a: any, b: any): boolean; + lte(a: any, b: any): boolean; + mod(a: number, b: number): number; + mul(a: number, b: number): number; + sl(a: number, b: number): number; + sr(a: number, b: number): number; + sub(a: number, b: number): number; + bnot(a: number): number; + neg(a: number): number; + not(a: boolean): boolean; + pos(a: number): number; + } + + var Nullable: Nullable; + + export interface Char { + isWhiteSpace(value: string): boolean; + isDigit(value: number): boolean; + isLetter(value: number): boolean; + isHighSurrogate(value: number): boolean; + isLowSurrogate(value: number): boolean; + isSurrogate(value: number): boolean; + isSymbol(value: number): boolean; + isSeparator(value: number): boolean; + isPunctuation(value: number): boolean; + isNumber(value: number): boolean; + isControl(value: number): boolean; + } + + var Char: Char; + + export class Exception { + constructor(message: string, innerException?: Exception); + getMessage(): string; + getInnerException(): Exception; + getStackTrace(): any; + getData(): T; + toString(): string; + static create(error: string): Exception; + static create(error: Error): Exception; + } + + export class SystemException extends Exception { + constructor(message: string, innerException: Exception); + constructor(message: string); + } + + export class OutOfMemoryException extends SystemException { + constructor(message: string, innerException: Exception); + constructor(message: string); + } + + export class IndexOutOfRangeException extends SystemException { + constructor(message: string, innerException: Exception); + constructor(message: string); + } + + export class ArgumentException extends Exception { + constructor(message: string, paramName: string, innerException: Exception); + constructor(message: string, innerException: Exception); + constructor(message: string); + getParamName(): string; + } + + export class ArgumentNullException extends ArgumentException { + constructor(paramName: string, message?: string, innerException?: Exception); + } + + export class ArgumentOutOfRangeException extends ArgumentException { + constructor(paramName: string, message?: string, innerException?: Exception, actualValue?: any); + getActualValue(): T; + } + + export class ArithmeticException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class DivideByZeroException extends ArithmeticException { + constructor(message?: string, innerException?: Exception); + } + + export class OverflowException extends ArithmeticException { + constructor(message?: string, innerException?: Exception); + } + + export class FormatException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class InvalidCastException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class InvalidOperationException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class NotImplementedException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class NotSupportedException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class NullReferenceException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export interface IFormattable { + format(format: string, formatProvider: IFormatProvider): string; + } + var IFormattable: Function; + + export interface IComparable { + compareTo(obj: any): number; + } + var IComparable: Function; + + export interface IFormatProvider { + getFormat(formatType: any): any; + } + + export interface ICloneable { + clone(): any; + } + var ICloneable: Function; + + export interface IComparable$1 { + compareTo(other: T): number; + } + export function IComparable$1(T: { prototype: T }): { + prototype: IComparable$1; + } + + export interface IEquatable$1 { + equals(other: T): boolean; + } + export function IEquatable$1(T: { prototype: T }): { + prototype: IEquatable$1; + } + + export interface IDisposable { + dispose(): void; + } + var IDisposable: Function; + + export interface DateTime { + utcNow(): Date; + today(): Date; + format(date: Date, format?: string, provider?: System.Globalization.DateTimeFormatInfo): string; + parse(value: string, provider?: System.Globalization.DateTimeFormatInfo): Date; + parseExact(str: string, format?: string, provider?: System.Globalization.DateTimeFormatInfo, silent?: boolean): Date; + tryParse(str: string, provider: System.Globalization.DateTimeFormatInfo, result: { v: Date }): boolean; + tryParseExact(str: string, format: string, provider: System.Globalization.DateTimeFormatInfo, result: { v: Date }): boolean; + isDaylightSavingTime(dt: Date): boolean; + toUTC(dt: Date): Date; + toLocal(dt: Date): Date; + } + var Date: DateTime; + + export interface Guid extends System.IEquatable$1, System.IComparable$1, System.IFormattable { + equalsT(o: System.Guid): boolean; + compareTo(value: System.Guid): number; + toString(): string; + toString$1(format: string): string; + format(format: string, formatProvider: System.IFormatProvider): string; + toByteArray(): number[]; + getHashCode(): System.Guid; + $clone(to: System.Guid): System.Guid; + } + export interface GuidFunc extends Function { + prototype: Guid; + $ctor4: { + new (uuid: string): Guid + }; + $ctor1: { + new (b: number[]): Guid + }; + $ctor5: { + new (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): Guid + }; + $ctor3: { + new (a: number, b: number, c: number, d: number[]): Guid + }; + $ctor2: { + new (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): Guid + }; + ctor: { + new (): Guid + }; + empty: System.Guid; + parse(input: string): System.Guid; + parseExact(input: string, format: string): System.Guid; + tryParse(input: string, result: { v: System.Guid }): boolean; + tryParseExact(input: string, format: string, result: { v: System.Guid }): boolean; + newGuid(): System.Guid; + op_Equality(a: System.Guid, b: System.Guid): boolean; + op_Inequality(a: System.Guid, b: System.Guid): boolean; + } + var Guid: GuidFunc; + + export class TimeSpan implements IComparable, IComparable$1, IEquatable$1 { + static fromDays(value: number): TimeSpan; + static fromHours(value: number): TimeSpan; + static fromMilliseconds(value: number): TimeSpan; + static fromMinutes(value: number): TimeSpan; + static fromSeconds(value: number): TimeSpan; + static fromTicks(value: number): TimeSpan; + static getDefaultValue(): TimeSpan; + constructor(); + getTicks(): number; + getDays(): number; + getHours(): number; + getMilliseconds(): number; + getMinutes(): number; + getSeconds(): number; + getTotalDays(): number; + getTotalHours(): number; + getTotalMilliseconds(): number; + getTotalMinutes(): number; + getTotalSeconds(): number; + get12HourHour(): number; + add(ts: TimeSpan): TimeSpan; + subtract(ts: TimeSpan): TimeSpan; + duration(): TimeSpan; + negate(): TimeSpan; + compareTo(other: TimeSpan): number; + equals(other: TimeSpan): boolean; + format(str: string, provider?: System.Globalization.DateTimeFormatInfo): string; + toString(str: string, provider?: System.Globalization.DateTimeFormatInfo): string; + } + + export interface Random { + sample(): number; + internalSample(): number; + next(): number; + next$2(minValue: number, maxValue: number): number; + next$1(maxValue: number): number; + nextDouble(): number; + nextBytes(buffer: number[]): void; + } + export interface RandomFunc extends Function { + prototype: Random; + ctor: { + new (): Random + }; + $ctor1: { + new (seed: number): Random + }; + } + var Random: RandomFunc; + + module Collections { + export interface IEnumerable { + getEnumerator(): IEnumerator; + } + var IEnumerable: Function; + + export interface IEnumerator { + getCurrent(): any; + moveNext(): boolean; + reset(): void; + } + var IEnumerator: Function; + + export interface IEqualityComparer { + equals(x: any, y: any): boolean; + getHashCode(obj: any): number; + } + var IEqualityComparer: Function; + + export interface ICollection extends IEnumerable { + getCount(): number; + } + var ICollection: Function; + + module Generic { + export class KeyNotFoundException extends Exception { + constructor(message?: string, innerException?: Exception); + } + export interface IEnumerator$1 extends IEnumerator { + getCurrent(): T; + } + export function IEnumerator$1(T: { prototype: T }): { + prototype: IEnumerator$1; + } + + export interface IEnumerable$1 extends IEnumerable { + getEnumerator(): IEnumerator$1; + } + export function IEnumerable$1(T: { prototype: T }): { + prototype: IEnumerable$1; + } + + export interface ICollection$1 extends IEnumerable$1 { + getCount(): number; + add(item: T): void; + clear(): void; + contains(item: T): boolean; + remove(item: T): boolean; + } + export function ICollection$1(T: { prototype: T }): { + prototype: ICollection$1; + } + + export interface IEqualityComparer$1 extends IEqualityComparer { + equals(x: T, y: T): boolean; + getHashCode(obj: T): number; + } + export function IEqualityComparer$1(T: { prototype: T }): { + prototype: IEqualityComparer$1; + } + + export interface IDictionary$2 extends IEnumerable$1> { + get(key: TKey): TValue; + set(key: TKey, value: TValue): void; + getKeys(): ICollection$1; + getValues(): ICollection$1; + getCount(): number; + containsKey(key: TKey): boolean; + add(key: TKey, value: TValue): void; + remove(key: TKey): boolean; + tryGetValue(key: TKey, value: { v: TValue }): boolean; + } + export function IDictionary$2(TKey: { prototype: TKey }, TValue: { prototype: TValue }): { + prototype: IDictionary$2; + } + + export interface IList$1 extends ICollection$1 { + get(index: number): T; + set(index: number, value: T): void; + indexOf(item: T): number; + insert(index: number, item: T): void; + removeAt(index: number): void; + } + export function IList$1(T: { prototype: T }): { + prototype: IList$1; + } + + export interface IComparer$1 { + compare(x: T, y: T): number; + } + export function IComparer$1(T: { prototype: T }): { + prototype: IComparer$1; + } + + export interface EqualityComparer$1 extends IEqualityComparer$1 { + equals(x: T, y: T): boolean; + getHashCode(obj: T): number; + } + export function EqualityComparer$1(T: { prototype: T }): { + prototype: EqualityComparer$1; + new (): EqualityComparer$1; + } + + export interface Comparer$1 extends IComparer$1 { + compare(x: T, y: T): number; + } + export function Comparer$1(T: { prototype: T }): { + prototype: Comparer$1; + new (fn: { (x: T, y: T): number }): Comparer$1; + } + + export interface KeyValuePair$2 { + key: TKey; + value: TValue; + } + export function KeyValuePair$2(TKey: { prototype: TKey }, TValue: { prototype: TValue }): { + prototype: KeyValuePair$2; + new (key: TKey, value: TValue): KeyValuePair$2; + } + + export interface Dictionary$2 extends IDictionary$2 { + getKeys(): ICollection$1; + getValues(): ICollection$1; + clear(): void; + containsKey(key: TKey): boolean; + containsValue(value: TValue): boolean; + get(key: TKey): TValue; + set(key: TKey, value: TValue, add?: boolean): void; + add(key: TKey, value: TValue): void; + remove(key: TKey): boolean; + getCount(): number; + getComparer(): IEqualityComparer$1; + tryGetValue(key: TKey, value: { v: TValue }): boolean; + getEnumerator(): IEnumerator$1>; + } + export function Dictionary$2(TKey: { prototype: TKey }, TValue: { prototype: TValue }): { + prototype: Dictionary$2; + new (): Dictionary$2; + new (obj: Dictionary$2, comparer?: IEqualityComparer$1): Dictionary$2; + new (obj: any, comparer?: IEqualityComparer$1): Dictionary$2; + } + + export interface List$1 extends ICollection$1, IList$1 { + getCount(): number; + get(index: number): T; + set(index: number, value: T): void; + add(value: T): void; + addRange(items: T[]); + addRange(items: IEnumerable$1); + clear(): void; + indexOf(item: T, startIndex?: number): number; + insertRange(index: number, items: IEnumerable$1): void; + contains(item: T): boolean; + getEnumerator(): IEnumerator$1; + getRange(index: number, count?: number): List$1; + getRange(): List$1; + insert(index: number, item: T): void; + join(delimeter?: string): string; + lastIndexOf(item: T, fromIndex?: number): number; + remove(item: T): boolean; + removeAt(index: number): void; + removeRange(index: number, count: number): void; + reverse(): void; + slice(start: number, end: number): void; + sort(comparison?: { (x: T, y: T): number }); + splice(start: number, deleteCount: number, itemsToInsert?: IEnumerable$1): void; + splice(start: number, deleteCount: number, itemsToInsert?: T[]): void; + unshift(): void; + toArray(): T[]; + } + export function List$1(T: { prototype: T }): { + prototype: List$1; + new (): List$1; + new (obj: T[]): List$1; + new (obj: IEnumerable$1): List$1; + } + } + + module ObjectModel { + export interface ReadOnlyCollection$1 extends System.Collections.Generic.List$1 { + } + export function ReadOnlyCollection$1(T: { prototype: T }): { + prototype: ReadOnlyCollection$1; + new (obj: T[]): ReadOnlyCollection$1; + new (obj: System.Collections.Generic.IEnumerable$1): ReadOnlyCollection$1; + } + } + } + + module ComponentModel { + export interface INotifyPropertyChanged { + propertyChanged(sender: any, e: PropertyChangedEventArgs): void; + } + var INotifyPropertyChanged: Function; + + export class PropertyChangedEventArgs { + constructor(propertyName: string); + propertyName: string; + } + } + + module Globalization { + export class CultureNotFoundException extends ArgumentException { + constructor(paramName: string, invalidCultureName?: string, message?: string, innerException?: Exception); + getInvalidCultureName(): string; + } + + export class DateTimeFormatInfo implements IFormatProvider, ICloneable { + invariantInfo: DateTimeFormatInfo; + clone(): any; + getFormat(type: any): any; + getAbbreviatedDayName(dayofweek: number): string; + getAbbreviatedMonthName(month: number): string; + getAllDateTimePatterns(format: string, returnNull?: boolean): string[]; + getDayName(dayofweek: number): string; + getMonthName(month: number): string; + getShortestDayName(dayofweek: number): string; + } + + export class NumberFormatInfo implements IFormatProvider, ICloneable { + invariantInfo: NumberFormatInfo; + clone(): any; + getFormat(type: any): any; + } + + export class CultureInfo implements IFormatProvider, ICloneable { + constructor(name: string); + invariantCulture: CultureInfo; + clone(): any; + getFormat(type: any): any; + static getCurrentCulture(): CultureInfo; + static setCurrentCulture(culture: CultureInfo): void; + static getCultureInfo(name: string): CultureInfo; + static getCultures(): CultureInfo[]; + } + } + + module Text { + export class StringBuilder { + constructor(); + constructor(value: string); + constructor(value: string, capacity: number); + constructor(value: string, startIndex: number, length: number); + getLength(): number; + getCapacity(): number; + setCapacity(value: number): void; + toString(startIndex?: number, length?: number): string; + append(value: string): StringBuilder; + append(value: string, count: number): StringBuilder; + append(value: string, startIndex: number, count: number): StringBuilder; + appendFormat(format: string, ...args: string[]): StringBuilder; + clear(): void; + appendLine(): StringBuilder; + equals(sb: StringBuilder): boolean; + remove(startIndex: number, length: number): StringBuilder; + insert(index: number, value: string, count?: number): StringBuilder; + replace(oldValue: string, newValue: string, startIndex?: number, count?: number): StringBuilder; + } + } + + module Threading { + module Tasks { + export class Task { + constructor(action: Function, state?: any); + static delay(delay: number, state?: any): Task; + static fromResult(result: any): Task; + static run(fn: Function): Task; + static whenAll(tasks: Task[]): Task; + static whenAny(tasks: Task[]): Task; + static fromCallback(target: any, method: string, ...otherArguments: any[]): Task; + static fromCallbackResult(target: any, method: string, resultHandler: Function, ...otherArguments: any[]): Task; + static fromCallbackOptions(target: any, method: string, name: string, ...otherArguments: any[]): Task; + static fromPromise(promise: Bridge.IPromise, handler: Function): Task; + continueWith(continuationAction: Function): Task; + start(): void; + complete(result?: any): boolean; + isCanceled(): boolean; + isCompleted(): boolean; + isFaulted(): boolean; + getResult(): T; + setCanceled(): void; + setResult(result: any): void; + setError(error: Exception): void; + } + } + } +} + +declare module Bridge.Linq { + interface EnumerableStatic { + Utils: { + createLambda(expression: any): (...params: any[]) => any; + createEnumerable(getEnumerator: () => System.Collections.IEnumerator): Enumerable; + createEnumerator(initialize: () => void, tryGetNext: () => boolean, dispose: () => void): System.Collections.IEnumerator; + extendTo(type: any): void; + }; + choice(...params: any[]): Enumerable; + cycle(...params: any[]): Enumerable; + empty(): Enumerable; + from(): Enumerable; + from(obj: Enumerable): Enumerable; + from(obj: string): Enumerable; + from(obj: number): Enumerable; + from(obj: { length: number;[x: number]: any; }): Enumerable; + from(obj: any): Enumerable; + make(element: any): Enumerable; + matches(input: string, pattern: RegExp): Enumerable; + matches(input: string, pattern: string, flags?: string): Enumerable; + range(start: number, count: number, step?: number): Enumerable; + rangeDown(start: number, count: number, step?: number): Enumerable; + rangeTo(start: number, to: number, step?: number): Enumerable; + repeat(element: any, count?: number): Enumerable; + repeatWithFinalize(initializer: () => any, finalizer: (element: any) => void): Enumerable; + generate(func: () => any, count?: number): Enumerable; + toInfinity(start?: number, step?: number): Enumerable; + toNegativeInfinity(start?: number, step?: number): Enumerable; + unfold(seed: any, func: (value: any) => any): Enumerable; + defer(enumerableFactory: () => Enumerable): Enumerable; + } + + interface Enumerable { + constructor(getEnumerator: () => System.Collections.IEnumerator): Enumerable; + getEnumerator(): System.Collections.IEnumerator; + + // Extension Methods + traverseBreadthFirst(func: (element: any) => Enumerable, resultSelector?: (element: any, nestLevel: number) => any): Enumerable; + traverseDepthFirst(func: (element: any) => Enumerable, resultSelector?: (element: any, nestLevel: number) => any): Enumerable; + flatten(): Enumerable; + pairwise(selector: (prev: any, current: any) => any): Enumerable; + scan(func: (prev: any, current: any) => any): Enumerable; + scan(seed: any, func: (prev: any, current: any) => any): Enumerable; + select(selector: (element: any, index: number) => any): Enumerable; + selectMany(collectionSelector: (element: any, index: number) => any[], resultSelector?: (outer: any, inner: any) => any): Enumerable; + selectMany(collectionSelector: (element: any, index: number) => Enumerable, resultSelector?: (outer: any, inner: any) => any): Enumerable; + selectMany(collectionSelector: (element: any, index: number) => { length: number;[x: number]: any; }, resultSelector?: (outer: any, inner: any) => any): Enumerable; + where(predicate: (element: any, index: number) => boolean): Enumerable; + choose(selector: (element: any, index: number) => any): Enumerable; + ofType(type: any): Enumerable; + zip(second: any[], resultSelector: (first: any, second: any, index: number) => any): Enumerable; + zip(second: Enumerable, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + zip(second: { length: number;[x: number]: any; }, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + zip(...params: any[]): Enumerable; // last one is selector + merge(second: any[], resultSelector: (first: any, second: any, index: number) => any): Enumerable; + merge(second: Enumerable, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + merge(second: { length: number;[x: number]: any; }, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + merge(...params: any[]): Enumerable; // last one is selector + join(inner: Enumerable, outerKeySelector: (outer: any) => any, innerKeySelector: (inner: any) => any, resultSelector: (outer: any, inner: any) => any, compareSelector?: (obj: any) => any): Enumerable; + groupJoin(inner: Enumerable, outerKeySelector: (outer: any) => any, innerKeySelector: (inner: any) => any, resultSelector: (outer: any, inner: any) => any, compareSelector?: (obj: any) => any): Enumerable; + all(predicate: (element: any) => boolean): boolean; + any(predicate?: (element: any) => boolean): boolean; + isEmpty(): boolean; + concat(...sequences: any[]): Enumerable; + insert(index: number, second: any[]): Enumerable; + insert(index: number, second: Enumerable): Enumerable; + insert(index: number, second: { length: number;[x: number]: any; }): Enumerable; + alternate(alternateValue: any): Enumerable; + alternate(alternateSequence: any[]): Enumerable; + alternate(alternateSequence: Enumerable): Enumerable; + contains(value: any, compareSelector: (element: any) => any): Enumerable; + contains(value: any): Enumerable; + defaultIfEmpty(defaultValue?: any): Enumerable; + distinct(compareSelector?: (element: any) => any): Enumerable; + distinctUntilChanged(compareSelector: (element: any) => any): Enumerable; + except(second: any[], compareSelector?: (element: any) => any): Enumerable; + except(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + except(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + intersect(second: any[], compareSelector?: (element: any) => any): Enumerable; + intersect(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + intersect(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + sequenceEqual(second: any[], compareSelector?: (element: any) => any): Enumerable; + sequenceEqual(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + sequenceEqual(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + union(second: any[], compareSelector?: (element: any) => any): Enumerable; + union(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + union(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + orderBy(keySelector: (element: any) => any): OrderedEnumerable; + orderByDescending(keySelector: (element: any) => any): OrderedEnumerable; + reverse(): Enumerable; + shuffle(): Enumerable; + weightedSample(weightSelector: (element: any) => any): Enumerable; + groupBy(keySelector: (element: any) => any, elementSelector?: (element: any) => any, resultSelector?: (key: any, element: any) => any, compareSelector?: (element: any) => any): Enumerable; + partitionBy(keySelector: (element: any) => any, elementSelector?: (element: any) => any, resultSelector?: (key: any, element: any) => any, compareSelector?: (element: any) => any): Enumerable; + buffer(count: number): Enumerable; + aggregate(func: (prev: any, current: any) => any): any; + aggregate(seed: any, func: (prev: any, current: any) => any, resultSelector?: (last: any) => any): any; + average(selector?: (element: any) => any): number; + count(predicate?: (element: any, index: number) => boolean): number; + max(selector?: (element: any) => any): number; + min(selector?: (element: any) => any): number; + maxBy(keySelector: (element: any) => any): any; + minBy(keySelector: (element: any) => any): any; + sum(selector?: (element: any) => any): number; + elementAt(index: number): any; + elementAtOrDefault(index: number, defaultValue?: any): any; + first(predicate?: (element: any, index: number) => boolean): any; + firstOrDefault(predicate?: (element: any, index: number) => boolean, defaultValue?: any): any; + last(predicate?: (element: any, index: number) => boolean): any; + lastOrDefault(predicate?: (element: any, index: number) => boolean, defaultValue?: any): any; + single(predicate?: (element: any, index: number) => boolean): any; + singleOrDefault(predicate?: (element: any, index: number) => boolean, defaultValue?: any): any; + skip(count: number): Enumerable; + skipWhile(predicate: (element: any, index: number) => boolean): Enumerable; + take(count: number): Enumerable; + takeWhile(predicate: (element: any, index: number) => boolean): Enumerable; + takeExceptLast(count?: number): Enumerable; + takeFromLast(count: number): Enumerable; + indexOf(item: any): number; + indexOf(predicate: (element: any, index: number) => boolean): number; + lastIndexOf(item: any): number; + lastIndexOf(predicate: (element: any, index: number) => boolean): number; + asEnumerable(): Enumerable; + toArray(): any[]; + toLookup(keySelector: (element: any) => any, elementSelector?: (element: any) => any, compareSelector?: (element: any) => any): Lookup; + toObject(keySelector: (element: any) => any, elementSelector?: (element: any) => any): Object; + toDictionary(keySelector: (element: any) => any, elementSelector?: (element: any) => any, compareSelector?: (element: any) => any): Dictionary; + toJSONString(replacer: (key: string, value: any) => any): string; + toJSONString(replacer: any[]): string; + toJSONString(replacer: (key: string, value: any) => any, space: any): string; + toJSONString(replacer: any[], space: any): string; + toJoinedString(separator?: string, selector?: (element: any, index: number) => any): string; + doAction(action: (element: any, index: number) => void): Enumerable; + doAction(action: (element: any, index: number) => boolean): Enumerable; + forEach(action: (element: any, index: number) => void): void; + forEach(action: (element: any, index: number) => boolean): void; + write(separator?: string, selector?: (element: any) => any): void; + writeLine(selector?: (element: any) => any): void; + force(): void; + letBind(func: (source: Enumerable) => any[]): Enumerable; + letBind(func: (source: Enumerable) => { length: number;[x: number]: any; }): Enumerable; + letBind(func: (source: Enumerable) => Enumerable): Enumerable; + share(): DisposableEnumerable; + memoize(): DisposableEnumerable; + catchError(handler: (exception: any) => void): Enumerable; + finallyAction(finallyAction: () => void): Enumerable; + log(selector?: (element: any) => void): Enumerable; + trace(message?: string, selector?: (element: any) => void): Enumerable; + } + + interface OrderedEnumerable extends Enumerable { + createOrderedEnumerable(keySelector: (element: any) => any, descending: boolean): OrderedEnumerable; + thenBy(keySelector: (element: any) => any): OrderedEnumerable; + thenByDescending(keySelector: (element: any) => any): OrderedEnumerable; + } + + interface DisposableEnumerable extends Enumerable { + dispose(): void; + } + + interface Dictionary { + add(key: any, value: any): void; + get(key: any): any; + set(key: any, value: any): boolean; + contains(key: any): boolean; + clear(): void; + remove(key: any): void; + count(): number; + toEnumerable(): Enumerable; // Enumerable + } + + interface Lookup { + count(): number; + get(key: any): Enumerable; + contains(key: any): boolean; + toEnumerable(): Enumerable; // Enumerable + } + + interface Grouping extends Enumerable { + key(): any; + } + + var Enumerable: EnumerableStatic; +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/bridge.min.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/bridge.min.js new file mode 100644 index 000000000..72d0ec7df --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/Scripts/bridge.min.js @@ -0,0 +1,8 @@ +/** + * @version : 15.7.0 - Bridge.NET + * @author : Object.NET, Inc. http://bridge.net/ + * @date : 2017-01-16 + * @copyright : Copyright 2008-2017 Object.NET, Inc. http://object.net/ + * @license : See license.txt and https://github.com/bridgedotnet/Bridge/blob/master/LICENSE.md + */ +(function(n){"use strict";var bt={global:n,emptyFn:function(){},identity:function(n){return n},geti:function(n,t,i){return Bridge.hasValue(n[t])?t:i},safe:function(n){try{return n()}catch(t){}return!1},literal:function(n,t){return t.$getType=function(){return n},t},isPlainObject:function(n){if(typeof n=="object"&&n!==null){if(typeof Object.getPrototypeOf=="function"){var t=Object.getPrototypeOf(n);return t===Object.prototype||t===null}return Object.prototype.toString.call(n)==="[object Object]"}return!1},toPlain:function(n){var i,t,r,u,f;if(!n||Bridge.isPlainObject(n)||typeof n!="object")return n;if(typeof n.toJSON=="function")return n.toJSON();if(Bridge.isArray(n)){for(i=[],t=0;t0&&t.length-u-1>0&&!isNaN(parseInt(t.substr(u+1)));h&&(u=t.substring(0,u-1).lastIndexOf("$"));u>0&&u!==t.length-1&&(e=t.substring(0,u)+"get"+t.substr(u+1),o=t.substring(0,u)+"set"+t.substr(u+1));n[e]=function(n,t,i){return i?function(){return t[n]}:function(){return this[n]}}(t,n,r);n[o]=function(n,t,i){return i?function(i){t[n]=i}:function(t){this[n]=t}}(t,n,r)},event:function(n,t,i,r){n[t]=i;var s=t.charAt(0)==="$",f=s?t.slice(1):t,e="add"+f,o="remove"+f,u=t.lastIndexOf("$"),h=u>0&&t.length-u-1>0&&!isNaN(parseInt(t.substr(u+1)));h&&(u=t.substring(0,u-1).lastIndexOf("$"));u>0&&u!==t.length-1&&(e=t.substring(0,u)+"add"+t.substr(u+1),o=t.substring(0,u)+"remove"+t.substr(u+1));n[e]=function(n,t,i){return i?function(i){t[n]=Bridge.fn.combine(t[n],i)}:function(t){this[n]=Bridge.fn.combine(this[n],t)}}(t,n,r);n[o]=function(n,t,i){return i?function(i){t[n]=Bridge.fn.remove(t[n],i)}:function(t){this[n]=Bridge.fn.remove(this[n],t)}}(t,n,r)},createInstance:function(n,t){return n===System.Decimal?System.Decimal.Zero:n===System.Int64?System.Int64.Zero:n===System.UInt64?System.UInt64.Zero:n===System.Double||n===System.Single||n===System.Byte||n===System.SByte||n===System.Int16||n===System.UInt16||n===System.Int32||n===System.UInt32||n===Bridge.Int?0:typeof n.createInstance=="function"?n.createInstance():typeof n.getDefaultValue=="function"?n.getDefaultValue():n===Boolean?!1:n===Date?new Date(0):n===Number?0:n===String?"":n&&n.$literal?n.ctor():t&&t.length>0?Bridge.Reflection.applyConstructor(n,t):new n},clone:function(n){if(Bridge.isArray(n))return System.Array.clone(n);if(Bridge.isString(n))return n;var t;return Bridge.isFunction(n[t="System$ICloneable$clone"])?n[t]():Bridge.is(n,System.ICloneable)?n.clone():null},copy:function(n,t,i,r){typeof i=="string"&&(i=i.split(/[,;\s]+/));for(var u,f=0,e=i?i.length:0;f=0;if(Bridge.isArray(n,u))return System.Array.is(n,t);if(u===String)return System.String.is(n,t)}return i!==!0&&t.$is?t.$is(n):t.$literal&&Bridge.isPlainObject(n)?n.$getType?Bridge.Reflection.isAssignableFrom(t,n.$getType()):!0:!1}if(f=typeof t,f==="boolean")return t;if(f==="string"&&(t=Bridge.unroll(t)),f==="function"&&Bridge.getType(n).prototype instanceof t)return!0;if(i!==!0){if(typeof t.$is=="function")return t.$is(n);if(typeof t.isAssignableFrom=="function")return t.isAssignableFrom(Bridge.getType(n))}return Bridge.isArray(n)?System.Array.is(n,t):f==="object"&&(u===t||n instanceof t)},as:function(n,t,i){return Bridge.is(n,t,!1,i)?n:null},cast:function(n,t,i){if(n==null)return n;var r=Bridge.is(n,t,!1,i)?n:null;if(r===null)throw new System.InvalidCastException("Unable to cast type "+(n?Bridge.getTypeName(n):"'null'")+" to type "+Bridge.getTypeName(t));return r},apply:function(n,t){for(var u=Bridge.getPropertyNames(t,!0),i,r=0;r=0||i.$isArray:!1},isFunction:function(n){return typeof n=="function"},isDate:function(n){return Object.prototype.toString.call(n)==="[object Date]"},isNull:function(n){return n===null||n===undefined},isBoolean:function(n){return typeof n=="boolean"},isNumber:function(n){return typeof n=="number"&&isFinite(n)},isString:function(n){return typeof n=="string"},unroll:function(n){var r=n.split("."),t=Bridge.global[r[0]],i=1;for(i;i-1||Bridge.$$rightChain.indexOf(t)>-1)return!1;for(var i in t)if(t.hasOwnProperty(i)!==n.hasOwnProperty(i)||typeof t[i]!=typeof n[i])return!1;for(i in n){if(t.hasOwnProperty(i)!==n.hasOwnProperty(i)||typeof n[i]!=typeof t[i])return!1;if(n[i]===t[i])continue;else if(typeof n[i]=="object"){if(Bridge.$$leftChain.push(n),Bridge.$$rightChain.push(t),!Bridge.deepEquals(n[i],t[i]))return!1;Bridge.$$leftChain.pop();Bridge.$$rightChain.pop()}else if(!Bridge.equals(n[i],t[i]))return!1}return!0}return Bridge.equals(n,t)},compare:function(n,t,i,r){if(Bridge.isDefined(n,!0)){if(Bridge.isNumber(n)||Bridge.isString(n)||Bridge.isBoolean(n))return Bridge.isString(n)&&!Bridge.hasValue(t)?1:nt?1:0;if(Bridge.isDate(n))return Bridge.compare(n.valueOf(),t.valueOf())}else{if(i)return 0;throw new System.NullReferenceException;}var u;if(r&&Bridge.isFunction(n[u="System$IComparable$1$"+Bridge.getTypeAlias(r)+"$compareTo"])||Bridge.isFunction(n[u="System$IComparable$compareTo"]))return n[u](t);if(Bridge.isFunction(n.compareTo))return n.compareTo(t);if(r&&Bridge.isFunction(t[u="System$IComparable$1$"+Bridge.getTypeAlias(r)+"$compareTo"])||Bridge.isFunction(t[u="System$IComparable$compareTo"]))return-t[u](n);if(Bridge.isFunction(t.compareTo))return-t.compareTo(n);if(i)return 0;throw new System.Exception("Cannot compare items");},equalsT:function(n,t,i){if(Bridge.isDefined(n,!0)){if(Bridge.isNumber(n)||Bridge.isString(n)||Bridge.isBoolean(n))return n===t;if(Bridge.isDate(n))return n.valueOf()===t.valueOf()}else throw new System.NullReferenceException;var r;return i&&n!=null&&Bridge.isFunction(n[r="System$IEquatable$1$"+Bridge.getTypeAlias(i)+"$equalsT"])?n[r](t):i&&t!=null&&Bridge.isFunction(t[r="System$IEquatable$1$"+Bridge.getTypeAlias(i)+"$equalsT"])?t[r](n):n.equalsT?n.equalsT(t):t.equalsT(n)},format:function(n,t,i){if(Bridge.isNumber(n))return Bridge.Int.format(n,t,i);if(Bridge.isDate(n))return Bridge.Date.format(n,t,i);var r;return Bridge.isFunction(n[r="System$IFormattable$format"])?n[r](t,i):n.format(t,i)},getType:function(n,t){if(n==null)throw new System.NullReferenceException("instance is null");if(t&&Bridge.Reflection.getBaseType(t)===Object)return t;if(typeof n=="number")return!isNaN(n)&&isFinite(n)&&Math.floor(n,0)===n?System.Int32:System.Double;if(n.$type)return n.$type;if(n.$getType)return n.$getType();try{return n.constructor}catch(i){return Object}},isLower:function(n){var t=String.fromCharCode(n);return t===t.toLowerCase()&&t!==t.toUpperCase()},isUpper:function(n){var t=String.fromCharCode(n);return t!==t.toLowerCase()&&t===t.toUpperCase()},coalesce:function(n,t){return Bridge.hasValue(n)?n:t},fn:{equals:function(n){return this===n?!0:n==null||this.constructor!==n.constructor?!1:this.equals===n.equals&&this.$method===n.$method&&this.$scope===n.$scope},call:function(n,t){var i=Array.prototype.slice.call(arguments,2);return n=n||Bridge.global,n[t].apply(n,i)},makeFn:function(n,t){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(){return n.apply(this,arguments)};case 2:return function(){return n.apply(this,arguments)};case 3:return function(){return n.apply(this,arguments)};case 4:return function(){return n.apply(this,arguments)};case 5:return function(){return n.apply(this,arguments)};case 6:return function(){return n.apply(this,arguments)};case 7:return function(){return n.apply(this,arguments)};case 8:return function(){return n.apply(this,arguments)};case 9:return function(){return n.apply(this,arguments)};case 10:return function(){return n.apply(this,arguments)};case 11:return function(){return n.apply(this,arguments)};case 12:return function(){return n.apply(this,arguments)};case 13:return function(){return n.apply(this,arguments)};case 14:return function(){return n.apply(this,arguments)};case 15:return function(){return n.apply(this,arguments)};case 16:return function(){return n.apply(this,arguments)};case 17:return function(){return n.apply(this,arguments)};case 18:return function(){return n.apply(this,arguments)};case 19:return function(){return n.apply(this,arguments)};default:return function(){return n.apply(this,arguments)}}},cacheBind:function(n,t,i,r){return Bridge.fn.bind(n,t,i,r,!0)},bind:function(n,t,i,r,u){var e,f;if(t&&t.$method===t&&t.$scope===n)return t;if(n&&u&&n.$$bind)for(e=0;e=0;i--){for(o=!1,u=0;u2147483647)throw new System.ArgumentOutOfRangeException("timeout","Number must be either non-negative and less than or equal to Int32.MaxValue or -1");n==-1&&(n=2147483647);for(var i=(new Date).getTime();(new Date).getTime()-i2147483647)break},getMetadata:function(n){return n.$getMetadata?n.$getMetadata():n.$metadata}},nt,s,at,o,vt,yt,pt,k,wt,t;n.Bridge=bt;n.Bridge.caller=[];n.System={};n.System.Diagnostics={};n.System.Diagnostics.Contracts={};n.System.Threading={};nt={is:function(n,t){return Bridge.isString(n)?n.constructor===t||n instanceof t?!0:t===System.ICloneable||t===System.Collections.IEnumerable||t===System.Collections.Generic.IEnumerable$1(System.Char)||t===System.IComparable$1(String)||t===System.IEquatable$1(String)?!0:!1:!1},lastIndexOf:function(n,t,i,r){var u=n.lastIndexOf(t,i);return u=f;u--)if(t.indexOf(n.charAt(u))>=0)return u;return-1},isNullOrWhiteSpace:function(n){return n?System.Char.isWhiteSpace(n):!0},isNullOrEmpty:function(n){return!n},fromCharCount:function(n,t){if(t>=0)return String(Array(t+1).join(String.fromCharCode(n)));throw new System.ArgumentOutOfRangeException("count","cannot be less than zero");},format:function(n){return System.String._format(System.Globalization.CultureInfo.getCurrentCulture(),n,Array.prototype.slice.call(arguments,1))},formatProvider:function(n,t){return System.String._format(n,t,Array.prototype.slice.call(arguments,2))},_format:function(n,t,i){var u=this,f=i,r=this.decodeBraceSequence;return t.replace(/(\{+)((\d+|[a-zA-Z_$]\w+(?:\.[a-zA-Z_$]\w+|\[\d+\])*)(?:\,(-?\d*))?(?:\:([^\}]*))?)(\}+)|(\{+)|(\}+)/g,function(t,i,e,o,s,h,c,l,a){return l?r(l):a?r(a):i.length%2==0||c.length%2==0?r(i)+e+r(c):r(i,!0)+u.handleElement(n,o,s,h,f)+r(c,!0)})},handleElement:function(n,t,i,r,u){var f;if(t=parseInt(t,10),t>u.length-1)throw new System.FormatException("Input string was not in a correct format.");return f=u[t],f==null&&(f=""),f=r&&Bridge.is(f,System.IFormattable)?Bridge.format(f,r,n):""+f,i&&(i=parseInt(i,10),Bridge.isNumber(i)||(i=null)),System.String.alignString(f.toString(),i)},decodeBraceSequence:function(n,t){return n.substr(0,(n.length+(t?0:1))/2)},alignString:function(n,t,i,r,u){if(n==null||!t)return n;if(i||(i=" "),Bridge.isNumber(i)&&(i=String.fromCharCode(i)),r||(r=t<0?1:2),t=Math.abs(t),u&&n.length>t&&(n=n.substring(0,t)),t+1>=n.length)switch(r){case 2:n=Array(t+1-n.length).join(i)+n;break;case 3:var f=t-n.length,e=Math.ceil(f/2),o=f-e;n=Array(o+1).join(i)+n+Array(e+1).join(i);break;case 1:default:n=n+Array(t+1-n.length).join(i)}return n},startsWith:function(n,t){return t.length?t.length>n.length?!1:(t=System.String.escape(t),n.match("^"+t)!==null):!0},endsWith:function(n,t){return t.length?t.length>n.length?!1:(t=System.String.escape(t),n.match(t+"$")!==null):!0},contains:function(n,t){if(t==null)throw new System.ArgumentNullException;return n==null?!1:n.indexOf(t)>-1},indexOfAny:function(n,t){var i,r,e,u,o,f;if(t==null)throw new System.ArgumentNullException;if(n==null||n==="")return-1;if(i=arguments.length>2?arguments[2]:0,i<0)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero");if(r=arguments.length>3?arguments[3]:n.length-i,r<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");if(r>n.length-i)throw new System.ArgumentOutOfRangeException("Index and length must refer to a location within the string");for(e=n.substr(i,r),u=0;u-1)return f+i;return-1},indexOf:function(n,t){var i,u,f,r;if(t==null)throw new System.ArgumentNullException;if(n==null||n==="")return-1;if(i=arguments.length>2?arguments[2]:0,i<0||i>n.length)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero and must refer to a location within the string");if(t==="")return arguments.length>2?i:0;if(u=arguments.length>3?arguments[3]:n.length-i,u<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");if(u>n.length-i)throw new System.ArgumentOutOfRangeException("Index and length must refer to a location within the string");return(f=n.substr(i,u),r=arguments.length===5&&arguments[4]%2!=0?f.toLocaleUpperCase().indexOf(t.toLocaleUpperCase()):f.indexOf(t),r>-1)?arguments.length===5?System.String.compare(t,f.substr(r,t.length),arguments[4])===0?r+i:-1:r+i:-1},equals:function(){return System.String.compare.apply(this,arguments)===0},compare:function(n,t){if(n==null)return t==null?0:-1;if(t==null)return 1;if(arguments.length>=3)if(Bridge.isBoolean(arguments[2])){if(arguments[2]&&(n=n.toLocaleUpperCase(),t=t.toLocaleUpperCase()),arguments.length===4)return n.localeCompare(t,arguments[3].name)}else switch(arguments[2]){case 1:return n.localeCompare(t,System.Globalization.CultureInfo.getCurrentCulture().name,{sensitivity:"accent"});case 2:return n.localeCompare(t,System.Globalization.CultureInfo.invariantCulture.name);case 3:return n.localeCompare(t,System.Globalization.CultureInfo.invariantCulture.name,{sensitivity:"accent"});case 4:return n===t?0:n>t?1:-1;case 5:return n.toUpperCase()===t.toUpperCase()?0:n.toUpperCase()>t.toUpperCase()?1:-1}return n.localeCompare(t)},toCharArray:function(n,t,i){var u,r;if(t<0||t>n.length||t>n.length-i)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero and must refer to a location within the string");if(i<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");for(Bridge.hasValue(t)||(t=0),Bridge.hasValue(i)||(i=n.length),u=[],r=t;r0?t.substring(0,n)+i+t.substring(n,t.length):i+t},remove:function(n,t,i){if(n==null)throw new System.NullReferenceException;if(t<0)throw new System.ArgumentOutOfRangeException("startIndex","StartIndex cannot be less than zero");if(i!=null){if(i<0)throw new System.ArgumentOutOfRangeException("count","Count cannot be less than zero");if(i>n.length-t)throw new System.ArgumentOutOfRangeException("count","Index and count must refer to a location within the string");}else if(t>=n.length)throw new System.ArgumentOutOfRangeException("startIndex","startIndex must be less than length of string");return i==null||t+i>n.length?n.substr(0,t):n.substr(0,t)+n.substr(t+i)},split:function(n,t,i,r){for(var o=!Bridge.hasValue(t)||t.length===0?new RegExp("\\s","g"):new RegExp(t.map(System.String.escape).join("|"),"g"),f=[],e,u=0;;u=o.lastIndex)if(e=o.exec(n)){if(r!==1||e.index>u){if(f.length===i-1)return f.push(n.substr(u)),f;f.push(n.substring(u,e.index))}}else return(r!==1||u!==n.length)&&f.push(n.substr(u)),f},trimEnd:function(n,t){return n.replace(t?new RegExp("["+System.String.escape(String.fromCharCode.apply(null,t))+"]+$"):/\s*$/,"")},trimStart:function(n,t){return n.replace(t?new RegExp("^["+System.String.escape(String.fromCharCode.apply(null,t))+"]+"):/^\s*/,"")},trim:function(n,t){return System.String.trimStart(System.String.trimEnd(n,t),t)},concat:function(){for(var t,i="",n=0;n=0;e--){v=c[e].trim();h=!1;for(u in f)if(s.nameEquals(u,v,i)){l|=f[u];h=!0;break}if(!h){a=!1;break}}if(a)return l}else for(u in f)if(s.nameEquals(u,t,i))return f[u];if(r!==!0)throw new System.ArgumentException("Invalid Enumeration Value");return null},toString:function(n,t,i){var u,e,f,r;if(n===Number)return t.toString();if(System.Enum.checkEnumType(n),u=n,e=System.Int64.is64Bit(t),(n.prototype&&n.prototype.$flags||i===!0)&&t!==0){f=[];for(r in u)(e&&System.Int64.is64Bit(u[r])?!u[r].and(t).isZero():u[r]&t)&&f.push(s.toName(r));return f.length?f.join(", "):t.toString()}for(r in u)if(e&&System.Int64.is64Bit(u[r])?u[r].eq(t):u[r]===t)return s.toName(r);return t.toString()},getValues:function(n){var r,t,i;System.Enum.checkEnumType(n);r=[];t=n;for(i in t)t.hasOwnProperty(i)&&i.indexOf("$")<0&&typeof t[i]!="function"&&r.push(t[i]);return r.sort(function(n,t){return n-t})},format:function(n,t,i){System.Enum.checkEnumType(n);var r;if(!Bridge.hasValue(t)&&(r="value")||!Bridge.hasValue(i)&&(r="format"))throw new System.ArgumentNullException(r);switch(i){case"G":case"g":return System.Enum.toString(n,t);case"x":case"X":return t.toString(16);case"d":case"D":return t.toString();case"f":case"F":return System.Enum.toString(n,t,!0);default:throw new System.FormatException;}},getNames:function(n){var r,i,t;System.Enum.checkEnumType(n);r=[];i=n;for(t in i)i.hasOwnProperty(t)&&t.indexOf("$")<0&&typeof i[t]!="function"&&r.push([s.toName(t),i[t]]);return r.sort(function(n,t){return n[1]-t[1]}).map(function(n){return n[0]})},getName:function(n,t){var i,r;if(t==null)throw new System.ArgumentNullException("value");if(!(typeof t=="number"&&Math.floor(t,0)===t))throw new System.ArgumentException("Argument must be integer","value");System.Enum.checkEnumType(n);i=n;for(r in i)if(i[r]===t)return r;return null},hasFlag:function(n,t){return!!(n&t)},isDefined:function(n,t){var i,u,r;System.Enum.checkEnumType(n);i=n;u=Bridge.isString(t);for(r in i)if(u?s.nameEquals(r,t,!1):i[r]===t)return!0;return!1},tryParse:function(n,t,i,r){return(i.v=0,i.v=s.parse(n,t,r,!0),i.v==null)?!1:!0}};System.Enum=s;var i=function(n){return n.test(navigator.userAgent.toLowerCase())},tt=Bridge.global.document&&Bridge.global.document.compatMode==="CSS1Compat",v=function(n,t){var i;return n&&(i=t.exec(navigator.userAgent.toLowerCase()))?parseFloat(i[1]):0},r=Bridge.global.document?Bridge.global.document.documentMode:null,p=i(/opera/),kt=p&&i(/version\/10\.5/),it=i(/\bchrome\b/),d=i(/webkit/),c=!it&&i(/safari/),dt=c&&i(/applewebkit\/4/),gt=c&&i(/version\/3/),ni=c&&i(/version\/4/),ti=c&&i(/version\/5\.0/),ii=c&&i(/version\/5/),u=!p&&(i(/msie/)||i(/trident/)),e=u&&(i(/msie 7/)&&r!==8&&r!==9&&r!==10||r===7),h=u&&(i(/msie 8/)&&r!==7&&r!==9&&r!==10||r===8),l=u&&(i(/msie 9/)&&r!==7&&r!==8&&r!==10||r===9),w=u&&(i(/msie 10/)&&r!==7&&r!==8&&r!==9||r===10),rt=u&&(i(/trident\/7\.0/)&&r!==7&&r!==8&&r!==9&&r!==10||r===11),f=u&&i(/msie 6/),y=!d&&!u&&i(/gecko/),b=y&&i(/rv:1\.9/),ri=y&&i(/rv:2\.0/),ui=y&&i(/rv:5\./),fi=y&&i(/rv:10\./),ei=b&&i(/rv:1\.9\.0/),oi=b&&i(/rv:1\.9\.1/),si=b&&i(/rv:1\.9\.2/),ut=i(/windows|win32/),ft=i(/macintosh|mac os x/),et=i(/linux/),hi=v(!0,/\bchrome\/(\d+\.\d+)/),a=v(!0,/\bfirefox\/(\d+\.\d+)/),ci=v(u,/msie (\d+\.\d+)/),li=v(p,/version\/(\d+\.\d+)/),ai=v(c,/version\/(\d+\.\d+)/),vi=v(d,/webkit\/(\d+\.\d+)/),yi=Bridge.global.location?/^https/i.test(Bridge.global.location.protocol):!1,ot=/iPhone/i.test(navigator.platform),st=/iPod/i.test(navigator.platform),g=/iPad/i.test(navigator.userAgent),pi=/Blackberry/i.test(navigator.userAgent),ht=/Android/i.test(navigator.userAgent),ct=ft||ut||et&&!ht,lt=g,wi=!ct&&!lt,bi={isStrict:tt,isIEQuirks:u&&!tt&&(f||e||h||l),isOpera:p,isOpera10_5:kt,isWebKit:d,isChrome:it,isSafari:c,isSafari3:gt,isSafari4:ni,isSafari5:ii,isSafari5_0:ti,isSafari2:dt,isIE:u,isIE6:f,isIE7:e,isIE7m:f||e,isIE7p:u&&!f,isIE8:h,isIE8m:f||e||h,isIE8p:u&&!(f||e),isIE9:l,isIE9m:f||e||h||l,isIE9p:u&&!(f||e||h),isIE10:w,isIE10m:f||e||h||l||w,isIE10p:u&&!(f||e||h||l),isIE11:rt,isIE11m:f||e||h||l||w||rt,isIE11p:u&&!(f||e||h||l||w),isGecko:y,isGecko3:b,isGecko4:ri,isGecko5:ui,isGecko10:fi,isFF3_0:ei,isFF3_5:oi,isFF3_6:si,isFF4:4<=a&&a<5,isFF5:5<=a&&a<6,isFF10:10<=a&&a<11,isLinux:et,isWindows:ut,isMac:ft,chromeVersion:hi,firefoxVersion:a,ieVersion:ci,operaVersion:li,safariVersion:ai,webKitVersion:vi,isSecure:yi,isiPhone:ot,isiPod:st,isiPad:g,isBlackberry:pi,isAndroid:ht,isDesktop:ct,isTablet:lt,isPhone:wi,iOS:ot||g||st,standalone:Bridge.global.navigator?!!Bridge.global.navigator.standalone:!1};Bridge.Browser=bi;at={_initialize:function(){this.$initialized||(this.$initialized=Bridge.emptyFn,this.$staticInit&&this.$staticInit(),this.$initMembers&&this.$initMembers())},initConfig:function(n,t,i,r,u,f){var s,e,o,h;if(i.fields)for(e in i.fields)u[e]=i.fields[e];if(i.properties)for(e in i.properties)Bridge.property(u,e,i.properties[e],r);if(i.events)for(e in i.events)Bridge.event(u,e,i.events[e],r);if(i.alias)for(o=0;o0&&u.$$inherits[0].$staticInit&&u.$$inherits[0].$staticInit(),u.$base.ctor.call(this))},i.ctor=u),i.$literal&&(o&&o.getDefaultValue||(u.getDefaultValue=function(){var n={};return n.$getType=function(){return u},n}),u.$literal=!0,delete i.$literal),!l&&d&&(tt=Bridge.Class.set(tt,n,u)),r&&r.fn.$cache.push({type:u,args:r.args}),u.$$name=n,u.$kind=i.$kind,r&&l){for(u.$genericTypeDefinition=r.fn,u.$typeArguments=r.args,u.$assembly=r.fn.$assembly||Bridge.$currentAssembly,p=Bridge.Reflection.getTypeFullName(r.fn),s=0;s0)for(u=0;u0)for(u=0;u1?t[1]:"Object")},_makeQName:function(n,t){return n+(t?", "+t.name:"")},getTypeQName:function(n){return Bridge.Reflection._makeQName(Bridge.Reflection.getTypeFullName(n),n.$assembly)},getTypeName:function(n){var t=Bridge.Reflection.getTypeFullName(n),i=t.indexOf("["),r=t.lastIndexOf(".",i>=0?i:t.length);return r>0?i>=0?t.substring(r+1,i):t.substr(r+1):t},getTypeNamespace:function(n){var t=Bridge.Reflection.getTypeFullName(n),u=t.indexOf("["),f=t.lastIndexOf(".",u>=0?u:t.length),i=f>0?t.substr(0,f):"",r;return n.$assembly&&(r=Bridge.Reflection._getAssemblyType(n.$assembly,i),r&&(i=Bridge.Reflection.getTypeNamespace(r))),i},getTypeAssembly:function(n){return System.Array.contains([Date,Number,Boolean,String,Function,Array],n)||n.$isArray?Bridge.SystemAssembly:n.$assembly||Bridge.SystemAssembly},_getAssemblyType:function(n,t){var e=!1,u,f,i,r;if(n||(n=Bridge.SystemAssembly,e=!0),n.$types){if(u=n.$types[t]||null,u)return u;if(n.name==="mscorlib")n=Bridge.global;else return null}for(f=t.split("."),i=n,r=0;r0?n.substring(r.index+1,i.lastIndex-1):n.substring(r.index+1)).trim()])))return null;break;case",":if(i.exec(n),!(t=System.Reflection.Assembly.assemblies[(i.lastIndex>0?n.substring(r.index+1,i.lastIndex-1):n.substring(r.index+1)).trim()]))return null}}else f=n.substring(o);return s&&i.lastIndex?null:(u=Bridge.Reflection._getAssemblyType(t,f.trim()),u=e.length?u.apply(null,e):u,u&&u.$staticInit&&u.$staticInit(),u)},getType:function(n,t){if(n==null)throw new System.ArgumentNullException("typeName");return n?Bridge.Reflection._getType(n,t):null},canAcceptNull:function(n){return n.$kind==="struct"||n===System.Decimal||n===System.Int64||n===System.UInt64||n===System.Double||n===System.Single||n===System.Byte||n===System.SByte||n===System.Int16||n===System.UInt16||n===System.Int32||n===System.UInt32||n===Bridge.Int||n===Boolean||n===Date||n===Number?!1:!0},applyConstructor:function(n,t){var a,f,s,h,e,i,r,c,o,u,l;if(!t||t.length===0)return new n;if(n.$$initCtor&&n.$kind!=="anonymous"){if(a=Bridge.getMetadata(n),f=0,a){for(s=Bridge.Reflection.getMembers(n,1,28),e=0;e1)throw new System.Exception("The ambiguous constructor call");}return l=function(){n.apply(this,t)},l.prototype=n.prototype,new l},getAttributes:function(n,t,i){var f=[],r,o,u,e,s,c,h;if(i&&(c=Bridge.Reflection.getBaseType(n),c))for(u=Bridge.Reflection.getAttributes(c,t,!0),r=0;r=0;h--)Bridge.Reflection.isInstanceOfType(f[h],o)&&f.splice(h,1);f.push(u)}return f},getMembers:function(n,t,i,r,u){var e=[],l,a,o,y,h,c,v,s,f;if(((i&72)==72||(i&6)==4)&&(l=Bridge.Reflection.getBaseType(n),l&&(e=Bridge.Reflection.getMembers(l,t&-2,i&(i&64?255:247)&(i&2?251:255),r,u))),a=function(n){if(t&n.t&&(i&4&&!n.is||i&8&&n.is)&&(!r||n.n===r)){if(u){if((n.p||[]).length!==u.length)return;for(var f=0;f1)throw new System.Reflection.AmbiguousMatchException("Ambiguous match");else if(s.length===1)return s[0];n=Bridge.Reflection.getBaseType(n)}return null}return e},midel:function(n,t,i){var r,u,f,e;if(n.is&&!!t)throw new System.ArgumentException("Cannot specify target for static method");else if(!n.is&&!t)throw new System.ArgumentException("Must specify target for instance method");if(n.fg)r=function(){return(n.is?n.td:this)[n.fg]};else if(n.fs)r=function(t){(n.is?n.td:this)[n.fs]=t};else{if(r=n.def||(n.is||n.sm?n.td[n.sn]:t[n.sn]),n.tpc){if(!i||i.length!==n.tpc)throw new System.ArgumentException("Wrong number of type arguments");u=r;r=function(){return u.apply(this,i.concat(Array.prototype.slice.call(arguments)))}}else if(i&&i.length)throw new System.ArgumentException("Cannot specify type arguments for non-generic method");n.exp&&(f=r,r=function(){return f.apply(this,Array.prototype.slice.call(arguments,0,arguments.length-1).concat(arguments[arguments.length-1]))});n.sm&&(e=r,r=function(){return e.apply(null,[this].concat(Array.prototype.slice.call(arguments)))})}return Bridge.fn.bind(t,r)},invokeCI:function(n,t){return n.exp&&(t=t.slice(0,t.length-1).concat(t[t.length-1])),n.def?n.def.apply(null,t):n.sm?n.td[n.sn].apply(null,t):Bridge.Reflection.applyConstructor(n.sn?n.td[n.sn]:n.td,t)},fieldAccess:function(n,t){if(n.is&&!!t)throw new System.ArgumentException("Cannot specify target for static field");else if(!n.is&&!t)throw new System.ArgumentException("Must specify target for instance field");if(t=n.is?n.td:t,arguments.length===3)t[n.sn]=arguments[2];else return t[n.sn]},getMetaValue:function(n,t,i){var r=n.$isTypeParameter?n:Bridge.getMetadata(n);return r?r[t]||i:i},isArray:function(n){return Bridge.arrayTypes.indexOf(n)>=0},hasGenericParameters:function(n){if(n.$typeArguments)for(var t=0;tt},gte:function(n,t){return Bridge.hasValue$1(n,t)&&n>=t},neq:function(n,t){return Bridge.hasValue(n)?n!==t:Bridge.hasValue(t)},lt:function(n,t){return Bridge.hasValue$1(n,t)&&n>t:null},srr:function(n,t){return Bridge.hasValue$1(n,t)?n>>>t:null},sub:function(n,t){return Bridge.hasValue$1(n,t)?n-t:null},bnot:function(n){return Bridge.hasValue(n)?~n:null},neg:function(n){return Bridge.hasValue(n)?-n:null},not:function(n){return Bridge.hasValue(n)?!n:null},pos:function(n){return Bridge.hasValue(n)?+n:null},lift:function(){for(var n=1;n=System.Char.min&&n<=System.Char.max},getDefaultValue:function(){return 0},parse:function(n){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("s");if(n.length!==1)throw new System.FormatException;return n.charCodeAt(0)},tryParse:function(n,t){var i=n&&n.length===1;return t.v=i?n.charCodeAt(0):0,i},format:function(n,t,i){return Bridge.Int.format(n,t,i)},charCodeAt:function(n,t){if(n==null)throw new System.ArgumentNullException;if(n.length!=1)throw new System.FormatException("String must be exactly one character long");return n.charCodeAt(t)},isWhiteSpace:function(n){return!/[^\s\x09-\x0D\x85\xA0]/.test(n)},isDigit:function(n){return n<256?n>=48&&n<=57:new RegExp("[0-90-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9]").test(String.fromCharCode(n))},isLetter:function(n){return n<256?n>=65&&n<=90||n>=97&&n<=122:new RegExp("[A-Za-za-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧա-ևᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓꞡꞣꞥꞧꞩꟺff-stﬓ-ﬗa-zA-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-ZDžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꜗ-ꜟꝰꞈꟸꟹꧏꩰꫝꫳꫴー゙゚ªºƻǀ-ǃʔא-תװ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॲ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎა-ჺჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳱᳵᳶℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]").test(String.fromCharCode(n))},isHighSurrogate:function(n){return new RegExp("[\uD800-\uDBFF]").test(String.fromCharCode(n))},isLowSurrogate:function(n){return new RegExp("[\uDC00-\uDFFF]").test(String.fromCharCode(n))},isSurrogate:function(n){return new RegExp("[\uD800-\uDFFF]").test(String.fromCharCode(n))},isNull:function(n){return new RegExp("\x00").test(String.fromCharCode(n))},isSymbol:function(n){return n<256?[36,43,60,61,62,94,96,124,126,162,163,164,165,166,167,168,169,172,174,175,176,177,180,182,184,215,247].indexOf(n)!=-1:new RegExp("[₠-⃏⃐-⃿℀-⅏⅐-↏←-⇿∀-⋿⌀-⏿■-◿☀-⛿✀-➿⟀-⟯⟰-⟿⠀-⣿⤀-⥿⦀-⧿⨀-⫿⬀-⯿]").test(String.fromCharCode(n))},isSeparator:function(n){return n<256?n==32||n==160:new RegExp("[\u2028\u2029   ᠎ -    ]").test(String.fromCharCode(n))},isPunctuation:function(n){return n<256?[33,34,35,37,38,39,40,41,42,44,45,46,47,58,59,63,64,91,92,93,95,123,125,161,171,173,183,187,191].indexOf(n)!=-1:new RegExp("[!-#%-*,-/:;?@[-]_{}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰૰෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⸻、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・-֊־᐀᠆‐-―⸗⸚⸺⸻〜〰゠︱︲﹘﹣-([{༺༼᚛‚„⁅⁽₍〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨〈《「『【〔〖〘〚〝﴾︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「)]}༻༽᚜⁆⁾₎〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩〉》」』】〕〗〙〛〞〟﴿︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」«‘‛“‟‹⸂⸄⸉⸌⸜⸠»’”›⸃⸅⸊⸍⸝⸡_‿⁀⁔︳︴﹍-﹏_!-#%-'*,./:;?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰૰෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙭᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・]").test(String.fromCharCode(n))},isNumber:function(n){return n<256?[48,49,50,51,52,53,54,55,56,57,178,179,185,188,189,190].indexOf(n)!=-1:new RegExp("[0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൦-൵๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-90-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൰-൵༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵]").test(String.fromCharCode(n))},isControl:function(n){return n<256?n>=0&&n<=31||n>=127&&n<=159:new RegExp("[\x00-\x1f€-Ÿ]").test(String.fromCharCode(n))}}});Bridge.Class.addExtend(System.Char,[System.IComparable$1(System.Char),System.IEquatable$1(System.Char)]);Bridge.define("System.FormattableString",{inherits:[System.IFormattable],statics:{invariant:function(n){return n.toString$1(System.Globalization.CultureInfo.invariantCulture)}},toString:function(){return this.toString$1(System.Globalization.CultureInfo.getCurrentCulture())},System$IFormattable$format:function(n,t){return this.toString$1(t)}});Bridge.define("System.FormattableStringImpl",{inherits:[System.FormattableString],args:null,format:null,ctor:function(n,t){t===void 0&&(t=[]);this.$initialize();System.FormattableString.ctor.call(this);this.format=n;this.args=t},getArgumentCount:function(){return this.args.length},getFormat:function(){return this.format},getArgument:function(n){return this.args[n]},getArguments:function(){return this.args},toString$1:function(n){return System.String.formatProvider.apply(System.String,[n,this.format].concat(this.args))}});Bridge.define("System.Runtime.CompilerServices.FormattableStringFactory",{statics:{create:function(n,t){return t===void 0&&(t=[]),new System.FormattableStringImpl(n,t)}}});Bridge.define("System.Exception",{ctor:function(n,t){this.$initialize();this.message=n?n:"Exception of type '"+Bridge.getTypeName(this)+"' was thrown.";this.innerException=t?t:null;this.errorStack=new Error;this.data=new(System.Collections.Generic.Dictionary$2(Object,Object))},getMessage:function(){return this.message},getInnerException:function(){return this.innerException},getStackTrace:function(){return this.errorStack.stack},getData:function(){return this.data},toString:function(){return this.getMessage()},statics:{create:function(n){return Bridge.is(n,System.Exception)?n:n instanceof TypeError?new System.NullReferenceException(n.message,new Bridge.ErrorException(n)):n instanceof RangeError?new System.ArgumentOutOfRangeException(null,n.message,new Bridge.ErrorException(n)):n instanceof Error?new Bridge.ErrorException(n):new System.Exception(n?n.toString():null)}}});Bridge.define("System.SystemException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"System error.",t)}});Bridge.define("System.OutOfMemoryException",{inherits:[System.SystemException],ctor:function(n,t){this.$initialize();n||(n="Insufficient memory to continue the execution of the program.");System.SystemException.ctor.call(this,n,t)}});Bridge.define("System.IndexOutOfRangeException",{inherits:[System.SystemException],ctor:function(n,t){this.$initialize();n||(n="Index was outside the bounds of the array.");System.SystemException.ctor.call(this,n,t)}});Bridge.define("System.TimeoutException",{inherits:[System.SystemException],ctor:function(n,t){this.$initialize();n||(n="The operation has timed out.");System.SystemException.ctor.call(this,n,t)}});Bridge.define("System.RegexMatchTimeoutException",{inherits:[System.TimeoutException],_regexInput:"",_regexPattern:"",_matchTimeout:null,config:{init:function(){this._matchTimeout=System.TimeSpan.fromTicks(-1)}},ctor:function(){this.$initialize();System.TimeoutException.ctor.call(this)},$ctor1:function(n){this.$initialize();System.TimeoutException.ctor.call(this,n)},$ctor2:function(n,t){this.$initialize();System.TimeoutException.ctor.call(this,n,t)},$ctor3:function(n,t,i){this.$initialize();this._regexInput=n;this._regexPattern=t;this._matchTimeout=i;this.$ctor1("The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.")},getPattern:function(){return this._regexPattern},getInput:function(){return this._regexInput},getMatchTimeout:function(){return this._matchTimeout}});Bridge.define("Bridge.ErrorException",{inherits:[System.Exception],ctor:function(n){this.$initialize();System.Exception.ctor.call(this,n.message);this.errorStack=n;this.error=n},getError:function(){return this.error}});Bridge.define("System.ArgumentException",{inherits:[System.Exception],ctor:function(n,t,i){this.$initialize();System.Exception.ctor.call(this,n||"Value does not fall within the expected range.",i);this.paramName=t?t:null},getParamName:function(){return this.paramName}});Bridge.define("System.ArgumentNullException",{inherits:[System.ArgumentException],ctor:function(n,t,i){this.$initialize();t||(t="Value cannot be null.",n&&(t+="\nParameter name: "+n));System.ArgumentException.ctor.call(this,t,n,i)}});Bridge.define("System.ArgumentOutOfRangeException",{inherits:[System.ArgumentException],ctor:function(n,t,i,r){this.$initialize();t||(t="Value is out of range.",n&&(t+="\nParameter name: "+n));System.ArgumentException.ctor.call(this,t,n,i);this.actualValue=r?r:null},getActualValue:function(){return this.actualValue}});Bridge.define("System.Globalization.CultureNotFoundException",{inherits:[System.ArgumentException],ctor:function(n,t,i,r,u){this.$initialize();i||(i="Culture is not supported.",n&&(i+="\nParameter name: "+n),t&&(i+="\n"+t+" is an invalid culture identifier."));System.ArgumentException.ctor.call(this,i,n,r);this.invalidCultureName=t?t:null;this.invalidCultureId=u?u:null},getInvalidCultureName:function(){return this.invalidCultureName},getInvalidCultureId:function(){return this.invalidCultureId}});Bridge.define("System.Collections.Generic.KeyNotFoundException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Key not found.",t)}});Bridge.define("System.ArithmeticException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Overflow or underflow in the arithmetic operation.",t)}});Bridge.define("System.DivideByZeroException",{inherits:[System.ArithmeticException],ctor:function(n,t){this.$initialize();System.ArithmeticException.ctor.call(this,n||"Division by 0.",t)}});Bridge.define("System.OverflowException",{inherits:[System.ArithmeticException],ctor:function(n,t){this.$initialize();System.ArithmeticException.ctor.call(this,n||"Arithmetic operation resulted in an overflow.",t)}});Bridge.define("System.FormatException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Invalid format.",t)}});Bridge.define("System.InvalidCastException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"The cast is not valid.",t)}});Bridge.define("System.InvalidOperationException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Operation is not valid due to the current state of the object.",t)}});Bridge.define("System.NotImplementedException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"The method or operation is not implemented.",t)}});Bridge.define("System.NotSupportedException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Specified method is not supported.",t)}});Bridge.define("System.NullReferenceException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Object is null.",t)}});Bridge.define("System.RankException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Attempted to operate on an array with the incorrect number of dimensions.",t)}});Bridge.define("Bridge.PromiseException",{inherits:[System.Exception],ctor:function(n,t,i){this.$initialize();this.arguments=System.Array.clone(n);t==null&&(t="Promise exception: [",t+=this.arguments.map(function(n){return n==null?"null":n.toString()}).join(", "),t+="]");System.Exception.ctor.call(this,t,i)},getArguments:function(){return this.arguments}});Bridge.define("System.OperationCanceledException",{inherits:[System.Exception],ctor:function(n,t,i){this.$initialize();System.Exception.ctor.call(this,n||"Operation was canceled.",i);this.cancellationToken=t||System.Threading.CancellationToken.none}});Bridge.define("System.Threading.Tasks.TaskCanceledException",{inherits:[System.OperationCanceledException],ctor:function(n,t,i){this.$initialize();System.OperationCanceledException.ctor.call(this,n||"A task was canceled.",null,i);this.task=t||null}});Bridge.define("System.AggregateException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();this.innerExceptions=new(System.Collections.ObjectModel.ReadOnlyCollection$1(System.Exception))(Bridge.hasValue(t)?Bridge.toArray(t):[]);System.Exception.ctor.call(this,n||"One or more errors occurred.",this.innerExceptions.items.length?this.innerExceptions.items[0]:null)},handle:function(n){var r,i,t;if(!Bridge.hasValue(n))throw new System.ArgumentNullException("predicate");for(r=this.innerExceptions.getCount(),i=[],t=0;t0)throw new System.AggregateException(this.getMessage(),i);},flatten:function(){var e=new(System.Collections.Generic.List$1(System.Exception)),n=new(System.Collections.Generic.List$1(System.AggregateException)),r,u,t,i,f;for(n.add(this),r=0;n.getCount()>r;)for(u=n.getItem(r++).innerExceptions,t=0;t6)throw new System.ArgumentOutOfRangeException("dayofweek");return this.abbreviatedDayNames[n]},getAbbreviatedMonthName:function(n){if(n<1||n>13)throw new System.ArgumentOutOfRangeException("month");return this.abbreviatedMonthNames[n-1]},getAllDateTimePatterns:function(n,t){var i=System.Globalization.DateTimeFormatInfo.$allStandardFormats,r,e,f,u,o=[];if(n){if(!i[n]){if(t)return null;throw new System.ArgumentException(null,"format");}r={};r[n]=i[n]}else r=i;for(i in r){for(e=r[i].split(" "),f="",u=0;u6)throw new System.ArgumentOutOfRangeException("dayofweek");return this.dayNames[n]},getMonthName:function(n){if(n<1||n>13)throw new System.ArgumentOutOfRangeException("month");return this.monthNames[n-1]},getShortestDayName:function(n){if(n<0||n>6)throw new System.ArgumentOutOfRangeException("dayOfWeek");return this.shortestDayNames[n]},clone:function(){return Bridge.copy(new System.Globalization.DateTimeFormatInfo,this,["abbreviatedDayNames","abbreviatedMonthGenitiveNames","abbreviatedMonthNames","amDesignator","dateSeparator","dayNames","firstDayOfWeek","fullDateTimePattern","longDatePattern","longTimePattern","monthDayPattern","monthGenitiveNames","monthNames","pmDesignator","rfc1123","shortDatePattern","shortestDayNames","shortTimePattern","sortableDateTimePattern","timeSeparator","universalSortableDateTimePattern","yearMonthPattern","roundtripFormat"])}});Bridge.define("System.Globalization.NumberFormatInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:{getFormat:"System$IFormatProvider$getFormat"}},statics:{ctor:function(){this.numberNegativePatterns=["(n)","-n","- n","n-","n -"];this.currencyNegativePatterns=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];this.currencyPositivePatterns=["$n","n$","$ n","n $"];this.percentNegativePatterns=["-n %","-n%","-%n","%-n","%n-","n-%","n%-","-% n","n %-","% n-","% -n","n- %"];this.percentPositivePatterns=["n %","n%","%n","% n"];this.invariantInfo=Bridge.merge(new System.Globalization.NumberFormatInfo,{nanSymbol:"NaN",negativeSign:"-",positiveSign:"+",negativeInfinitySymbol:"-Infinity",positiveInfinitySymbol:"Infinity",percentSymbol:"%",percentGroupSizes:[3],percentDecimalDigits:2,percentDecimalSeparator:".",percentGroupSeparator:",",percentPositivePattern:0,percentNegativePattern:0,currencySymbol:"¤",currencyGroupSizes:[3],currencyDecimalDigits:2,currencyDecimalSeparator:".",currencyGroupSeparator:",",currencyNegativePattern:0,currencyPositivePattern:0,numberGroupSizes:[3],numberDecimalDigits:2,numberDecimalSeparator:".",numberGroupSeparator:",",numberNegativePattern:1})}},getFormat:function(n){switch(n){case System.Globalization.NumberFormatInfo:return this;default:return null}},clone:function(){return Bridge.copy(new System.Globalization.NumberFormatInfo,this,["nanSymbol","negativeSign","positiveSign","negativeInfinitySymbol","positiveInfinitySymbol","percentSymbol","percentGroupSizes","percentDecimalDigits","percentDecimalSeparator","percentGroupSeparator","percentPositivePattern","percentNegativePattern","currencySymbol","currencyGroupSizes","currencyDecimalDigits","currencyDecimalSeparator","currencyGroupSeparator","currencyNegativePattern","currencyPositivePattern","numberGroupSizes","numberDecimalDigits","numberDecimalSeparator","numberGroupSeparator","numberNegativePattern"])}});Bridge.define("System.Globalization.CultureInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:{getFormat:"System$IFormatProvider$getFormat"}},$entryPoint:!0,statics:{ctor:function(){this.cultures=this.cultures||{};this.invariantCulture=Bridge.merge(new System.Globalization.CultureInfo("iv",!0),{englishName:"Invariant Language (Invariant Country)",nativeName:"Invariant Language (Invariant Country)",numberFormat:System.Globalization.NumberFormatInfo.invariantInfo,dateTimeFormat:System.Globalization.DateTimeFormatInfo.invariantInfo});this.setCurrentCulture(System.Globalization.CultureInfo.invariantCulture)},getCurrentCulture:function(){return this.currentCulture},setCurrentCulture:function(n){this.currentCulture=n;System.Globalization.DateTimeFormatInfo.currentInfo=n.dateTimeFormat;System.Globalization.NumberFormatInfo.currentInfo=n.numberFormat},getCultureInfo:function(n){if(!n)throw new System.ArgumentNullException("name");return this.cultures[n]},getCultures:function(){for(var t=Bridge.getPropertyNames(this.cultures),i=[],n=0;n0|-(n<0),n%1==.5*r)?(f=Math.floor(n),(f+(i===4?r>0:f%2*r))/u):Math.round(n)/u},log10:Math.log10||function(n){return Math.log(n)/Math.LN10},logWithBase:function(n,t){return isNaN(n)?n:isNaN(t)?t:t===1?NaN:n!==1&&(t===0||t===Number.POSITIVE_INFINITY)?NaN:Bridge.Math.log10(n)/Bridge.Math.log10(t)},log:function(n){return n===0?Number.NEGATIVE_INFINITY:n<0||isNaN(n)?NaN:n===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:n===Number.NEGATIVE_INFINITY?NaN:Math.log(n)},sinh:Math.sinh||function(n){return(Math.exp(n)-Math.exp(-n))/2},cosh:Math.cosh||function(n){return(Math.exp(n)+Math.exp(-n))/2},tanh:Math.tanh||function(n){if(n===Infinity)return 1;if(n===-Infinity)return-1;var t=Math.exp(2*n);return(t-1)/(t+1)}};yt={trueString:"True",falseString:"False",is:function(n,t){return t===System.IComparable||t===System.IEquatable$1(Boolean)||t===System.IComparable$1(Boolean)?!0:!1},$is:function(n){return typeof n=="boolean"},getDefaultValue:function(){return!1},toString:function(n){return n?System.Boolean.trueString:System.Boolean.falseString},parse:function(n){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("value");var t={v:!1};if(!System.Boolean.tryParse(n,t))throw new System.FormatException("Bad format for Boolean value");return t.v},tryParse:function(n,t){if(t.v=!1,!Bridge.hasValue(n))return!1;if(System.String.equals(System.Boolean.trueString,n,5))return t.v=!0,!0;if(System.String.equals(System.Boolean.falseString,n,5))return t.v=!1,!0;for(var i=0,r=n.length-1;i=i){if(!System.Char.isWhiteSpace(n[r])&&!System.Char.isNull(n.charCodeAt(r)))break;r--}return(n=n.substr(i,r-i+1),System.String.equals(System.Boolean.trueString,n,5))?(t.v=!0,!0):System.String.equals(System.Boolean.falseString,n,5)?(t.v=!1,!0):!1}};System.Boolean=yt,function(){var n=function(n,t,i,r){var u=Bridge.define(n,{inherits:[System.IComparable,System.IFormattable],statics:{$number:!0,min:t,max:i,precision:r,$is:function(n){return typeof n=="number"&&Math.floor(n,0)===n&&n>=t&&n<=i},getDefaultValue:function(){return 0},parse:function(n,r){return Bridge.Int.parseInt(n,t,i,r)},tryParse:function(n,r,u){return Bridge.Int.tryParseInt(n,r,t,i,u)},format:function(n,t,i){return Bridge.Int.format(n,t,i,u)}}});u.$kind="";Bridge.Class.addExtend(u,[System.IComparable$1(u),System.IEquatable$1(u)])};n("System.Byte",0,255,3);n("System.SByte",-128,127,3);n("System.Int16",-32768,32767,5);n("System.UInt16",0,65535,5);n("System.Int32",-2147483648,2147483647,10);n("System.UInt32",0,4294967295,10)}();Bridge.define("Bridge.Int",{inherits:[System.IComparable,System.IFormattable],statics:{$number:!0,$is:function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n,0)===n},getDefaultValue:function(){return 0},format:function(n,t,i,r){var e=(i||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),nt=e.numberDecimalSeparator,rt=e.numberGroupSeparator,f=n instanceof System.Decimal,o=n instanceof System.Int64||n instanceof System.UInt64,tt=f||o?n.isZero()?!1:n.isNegative():n<0,l,u,v,b,g,c,k,d,a;if(!o&&(f?!n.isFinite():!isFinite(n)))return Number.NEGATIVE_INFINITY===n||f&&tt?e.negativeInfinitySymbol:isNaN(n)?e.nanSymbol:e.positiveInfinitySymbol;if(t||(t="G"),l=t.match(/^([a-zA-Z])(\d*)$/),l){b=l[1].toUpperCase();u=parseInt(l[2],10);u=u>15?15:u;switch(b){case"D":return this.defaultFormat(n,isNaN(u)?1:u,0,0,e,!0);case"F":case"N":return isNaN(u)&&(u=e.numberDecimalDigits),this.defaultFormat(n,1,u,u,e,b==="F");case"G":case"E":for(var h=0,s=f||o?o&&n.eq(System.Int64.MinValue)?System.Int64(n.value.toUnsigned()):n.abs():Math.abs(n),y=l[1],it=3,p,w;f||o?s.gte(10):s>=10;)f||o?s=s.div(10):s/=10,h++;while(f||o?s.ne(0)&&s.lt(1):s!==0&&s<1)f||o?s=s.mul(10):s*=10,h--;if(b==="G"){if(g=isNaN(u),g&&(u=f?29:o?n instanceof System.Int64?19:20:r&&r.precision?r.precision:15),h>-5&&h0?h+1:1),this.defaultFormat(n,1,p,w,e,!0);y=y==="G"?"E":"e";it=2;p=0;w=(u||15)-1}else p=w=isNaN(u)?6:u;return h>=0?y+=e.positiveSign:(y+=e.negativeSign,h=-h),tt&&(f||o?s=s.mul(-1):s*=-1),this.defaultFormat(s,1,p,w,e)+y+this.defaultFormat(h,it,0,0,e,!0);case"P":return isNaN(u)&&(u=e.percentDecimalDigits),this.defaultFormat(n*100,1,u,u,e,!1,"percent");case"X":for(c=f?n.round().value.toHex().substr(2):o?n.toString(16):Math.round(n).toString(16),l[1]==="X"&&(c=c.toUpperCase()),u-=c.length;u-->0;)c="0"+c;return c;case"C":return isNaN(u)&&(u=e.currencyDecimalDigits),this.defaultFormat(n,1,u,u,e,!1,"currency");case"R":return k=f||o?n.toString():""+n,nt!=="."&&(k=k.replace(".",nt)),k.replace("e","E")}}if(t.indexOf(",.")!==-1||System.String.endsWith(t,",")){for(d=0,a=t.indexOf(",."),a===-1&&(a=t.length-1);a>-1&&t.charAt(a)===",";)d++,a--;f||o?n=n.div(Math.pow(1e3,d)):n/=Math.pow(1e3,d)}return t.indexOf("%")!==-1&&(f||o?n=n.mul(100):n*=100),t.indexOf("‰")!==-1&&(f||o?n=n.mul(1e3):n*=1e3),v=t.split(";"),(f||o?n.lt(0):n<0)&&v.length>1?(f||o?n=n.mul(-1):n*=-1,t=v[1]):t=v[(f||o?n.ne(0):!n)&&v.length>2?2:0],this.customFormat(n,t,e,!t.match(/^[^\.]*[0#],[0#]/))},defaultFormat:function(n,t,i,r,u,f,e){e=e||"number";var h=(u||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),o,p,w,ut,v,y,b=h[e+"GroupSizes"],s,k,d,l,a,g,nt,c="",tt=n instanceof System.Decimal,it=n instanceof System.Int64||n instanceof System.UInt64,ft=tt||it?n.isZero()?!1:n.isNegative():n<0,rt=!1;if(ut=Math.pow(10,r),o=tt?n.abs().toDecimalPlaces(r).toFixed():it?n.eq(System.Int64.MinValue)?n.value.toUnsigned().toString():n.abs().toString():""+ +Math.abs(n).toFixed(r),rt=o.split("").every(function(n){return n==="0"||n==="."}),p=o.indexOf("."),p>0&&(s=h[e+"DecimalSeparator"]+o.substr(p+1),o=o.substr(0,p)),o.lengthr&&(s=s.substr(0,r+1))):i>0&&(s=h[e+"DecimalSeparator"]+Array(i+1).join("0")),v=0,y=b[v],o.length=0?(nt&&this.addGroup(n.substr(0,f),l),this.addGroup(n.charAt(f),l)):f>=h-s&&this.addGroup("0",l),nt=0):(b-->0||f=n.length?"0":n.charAt(f),l),e=l.buffer,f++)):u==="."?(g||d||(e+=n.substr(0,h),g=!0),(n.length>++f||b>0)&&(rt=!0,e+=i[y+"DecimalSeparator"])):u!==","&&(e+=u);return tt&&!it&&(e="-"+e),e},addGroup:function(n,t){for(var i=t.buffer,f=t.sep,r=t.groupIndex,u=0,e=n.length;u1&&r--%3==1&&(i+=f);t.buffer=i;t.groupIndex=r},parseFloat:function(n,t){var i={};return Bridge.Int.tryParseFloat(n,t,i,!1),i.v},tryParseFloat:function(n,t,i,r){var l,a,u,v;if(i.v=0,r==null&&(r=!0),n==null){if(r)return!1;throw new System.ArgumentNullException("s");}n=n.trim();var f=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),h=f.numberDecimalSeparator,e=f.numberGroupSeparator,o="Input string was not in a correct format.",s=n.indexOf(h),c=e?n.indexOf(e):-1;if(s>-1&&(s-1&&s-1)){if(r)return!1;throw new System.FormatException(o);}if(h!=="."&&e!=="."&&n.indexOf(".")>-1){if(r)return!1;throw new System.FormatException(o);}if(c>-1){for(l="",u=0;u1){if(r)return!1;throw new System.FormatException(o);}}else{if(r)return!1;throw new System.FormatException(o);}if(v=parseFloat(n.replace(h,".")),isNaN(v)){if(r)return!1;throw new System.FormatException(o);}return i.v=v,!0},parseInt:function(n,t,i,r){if(r=r||10,n==null)throw new System.ArgumentNullException("str");if(r<=10&&!/^[+-]?[0-9]+$/.test(n)||r==16&&!/^[+-]?[0-9A-F]+$/gi.test(n))throw new System.FormatException("Input string was not in a correct format.");var u=parseInt(n,r);if(isNaN(u))throw new System.FormatException("Input string was not in a correct format.");if(ui)throw new System.OverflowException;return u},tryParseInt:function(n,t,i,r,u){return(t.v=0,u=u||10,u<=10&&!/^[+-]?[0-9]+$/.test(n)||u==16&&!/^[+-]?[0-9A-F]+$/gi.test(n))?!1:(t.v=parseInt(n,u),t.vr)?!1:!0},isInfinite:function(n){return n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY},trunc:function(n){return Bridge.isNumber(n)?n>0?Math.floor(n):Math.ceil(n):Bridge.Int.isInfinite(n)?n:null},div:function(n,t){if(!Bridge.isNumber(n)||!Bridge.isNumber(t))return null;if(t===0)throw new System.DivideByZeroException;return this.trunc(n/t)},mod:function(n,t){if(!Bridge.isNumber(n)||!Bridge.isNumber(t))return null;if(t===0)throw new System.DivideByZeroException;return n%t},check:function(n,t){if(System.Int64.is64Bit(n))return System.Int64.check(n,t);if(n instanceof System.Decimal)return System.Decimal.toInt(n,t);if(Bridge.isNumber(n)){if(System.Int64.is64BitType(t)){if(t===System.UInt64&&n<0)throw new System.OverflowException;return t===System.Int64?System.Int64(n):System.UInt64(n)}if(!t.$is(n))throw new System.OverflowException;}return Bridge.Int.isInfinite(n)?System.Int64.is64BitType(t)?t.MinValue:t.min:n},sxb:function(n){return Bridge.isNumber(n)?n|(n&128?4294967040:0):Bridge.Int.isInfinite(n)?System.SByte.min:null},sxs:function(n){return Bridge.isNumber(n)?n|(n&32768?4294901760:0):Bridge.Int.isInfinite(n)?System.Int16.min:null},clip8:function(n){return Bridge.isNumber(n)?Bridge.Int.sxb(n&255):Bridge.Int.isInfinite(n)?System.SByte.min:null},clipu8:function(n){return Bridge.isNumber(n)?n&255:Bridge.Int.isInfinite(n)?System.Byte.min:null},clip16:function(n){return Bridge.isNumber(n)?Bridge.Int.sxs(n&65535):Bridge.Int.isInfinite(n)?System.Int16.min:null},clipu16:function(n){return Bridge.isNumber(n)?n&65535:Bridge.Int.isInfinite(n)?System.UInt16.min:null},clip32:function(n){return Bridge.isNumber(n)?n|0:Bridge.Int.isInfinite(n)?System.Int32.min:null},clipu32:function(n){return Bridge.isNumber(n)?n>>>0:Bridge.Int.isInfinite(n)?System.UInt32.min:null},clip64:function(n){return Bridge.isNumber(n)?System.Int64(Bridge.Int.trunc(n)):Bridge.Int.isInfinite(n)?System.Int64.MinValue:null},clipu64:function(n){return Bridge.isNumber(n)?System.UInt64(Bridge.Int.trunc(n)):Bridge.Int.isInfinite(n)?System.UInt64.MinValue:null},sign:function(n){return Bridge.isNumber(n)?n===0?0:n<0?-1:1:null}}});Bridge.Int.$kind="";Bridge.Class.addExtend(Bridge.Int,[System.IComparable$1(Bridge.Int),System.IEquatable$1(Bridge.Int)]);Bridge.define("System.Double",{inherits:[System.IComparable,System.IFormattable],statics:{min:-Number.MAX_VALUE,max:Number.MAX_VALUE,precision:15,$number:!0,$is:function(n){return typeof n=="number"},getDefaultValue:function(){return 0},parse:function(n,t){return Bridge.Int.parseFloat(n,t)},tryParse:function(n,t,i){return Bridge.Int.tryParseFloat(n,t,i)},format:function(n,t,i){return Bridge.Int.format(n,t,i,System.Double)}}});System.Double.$kind="";Bridge.Class.addExtend(System.Double,[System.IComparable$1(System.Double),System.IEquatable$1(System.Double)]);Bridge.define("System.Single",{inherits:[System.IComparable,System.IFormattable],statics:{min:-34028234663852886e22,max:34028234663852886e22,precision:7,$number:!0,$is:System.Double.$is,getDefaultValue:System.Double.getDefaultValue,parse:System.Double.parse,tryParse:System.Double.tryParse,format:function(n,t,i){return Bridge.Int.format(n,t,i,System.Single)}}});System.Single.$kind="";Bridge.Class.addExtend(System.Single,[System.IComparable$1(System.Single),System.IEquatable$1(System.Single)]),function(n){function i(n,t,i){this.low=n|0;this.high=t|0;this.unsigned=!!i}function u(n){return!0===(n&&n.__isLong__)}function h(n,i){var r,u;if(i){if(n>>>=0,(u=0<=n&&256>n)&&(r=p[n]))return r;r=t(n,0>(n|0)?-1:0,!0);u&&(p[n]=r)}else{if(n|=0,(u=-128<=n&&128>n)&&(r=y[n]))return r;r=t(n,0>n?-1:0,!1);u&&(y[n]=r)}return r}function f(n,i){if(isNaN(n)||!isFinite(n))return i?s:e;if(i){if(0>n)return s;if(n>=d)return k}else{if(n<=-g)return r;if(n+1>=g)return b}return 0>n?f(-n,i).neg():t(n%4294967296|0,n/4294967296|0,i)}function t(n,t,r){return new i(n,t,r)}function v(n,t,i){var s,r,u,o,h;if(0===n.length)throw Error("empty string");if("NaN"===n||"Infinity"===n||"+Infinity"===n||"-Infinity"===n)return e;if("number"==typeof t?(i=t,t=!1):t=!!t,i=i||10,2>i||36o?(o=f(l(i,o)),r=r.mul(o).add(f(h))):(r=r.mul(s),r=r.add(f(h)));return r.unsigned=t,r}function o(n){return n instanceof i?n:"number"==typeof n?f(n):"string"==typeof n?v(n):t(n.low,n.high,n.unsigned)}var y,p,l,s,c,w,a,b,k,r;n.Bridge.$Long=i;i.__isLong__;Object.defineProperty(i.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1});i.isLong=u;y={};p={};i.fromInt=h;i.fromNumber=f;i.fromBits=t;l=Math.pow;i.fromString=v;i.fromValue=o;var d=4294967296*4294967296,g=d/2,nt=h(16777216),e=h(0);i.ZERO=e;s=h(0,!0);i.UZERO=s;c=h(1);i.ONE=c;w=h(1,!0);i.UONE=w;a=h(-1);i.NEG_ONE=a;b=t(-1,2147483647,!1);i.MAX_VALUE=b;k=t(-1,-1,!0);i.MAX_UNSIGNED_VALUE=k;r=t(0,-2147483648,!1);i.MIN_VALUE=r;n=i.prototype;n.toInt=function(){return this.unsigned?this.low>>>0:this.low};n.toNumber=function(){return this.unsigned?4294967296*(this.high>>>0)+(this.low>>>0):4294967296*this.high+(this.low>>>0)};n.toString=function(n){if(n=n||10,2>n||36>>0).toString(n),t=o;if(t.isZero())return i+e;for(;6>i.length;)i="0"+i;e=""+i+e}};n.getHighBits=function(){return this.high};n.getHighBitsUnsigned=function(){return this.high>>>0};n.getLowBits=function(){return this.low};n.getLowBitsUnsigned=function(){return this.low>>>0};n.getNumBitsAbs=function(){if(this.isNegative())return this.eq(r)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;0this.high};n.isPositive=function(){return this.unsigned||0<=this.high};n.isOdd=function(){return 1==(this.low&1)};n.isEven=function(){return 0==(this.low&1)};n.equals=function(n){return u(n)||(n=o(n)),this.unsigned!==n.unsigned&&1==this.high>>>31&&1==n.high>>>31?!1:this.high===n.high&&this.low===n.low};n.eq=n.equals;n.notEquals=function(n){return!this.eq(n)};n.neq=n.notEquals;n.lessThan=function(n){return 0>this.comp(n)};n.lt=n.lessThan;n.lessThanOrEqual=function(n){return 0>=this.comp(n)};n.lte=n.lessThanOrEqual;n.greaterThan=function(n){return 0>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1};n.comp=n.compare;n.negate=function(){return!this.unsigned&&this.eq(r)?r:this.not().add(c)};n.neg=n.negate;n.add=function(n){u(n)||(n=o(n));var e=this.high>>>16,i=this.high&65535,r=this.low>>>16,s=n.high>>>16,h=n.high&65535,c=n.low>>>16,f;return f=0+((this.low&65535)+(n.low&65535)),n=0+(f>>>16),n+=r+c,r=0+(n>>>16),r+=i+h,i=0+(r>>>16),i=i+(e+s)&65535,t((n&65535)<<16|f&65535,i<<16|r&65535,this.unsigned)};n.subtract=function(n){return u(n)||(n=o(n)),this.add(n.neg())};n.sub=n.subtract;n.multiply=function(n){var h,i,s,v;if(this.isZero()||(u(n)||(n=o(n)),n.isZero()))return e;if(this.eq(r))return n.isOdd()?r:e;if(n.eq(r))return this.isOdd()?r:e;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(nt)&&n.lt(nt))return f(this.toNumber()*n.toNumber(),this.unsigned);var w=this.high>>>16,y=this.high&65535,l=this.low>>>16,c=this.low&65535,b=n.high>>>16,p=n.high&65535,a=n.low>>>16;return n=n.low&65535,v=0+c*n,s=0+(v>>>16),s+=l*n,i=0+(s>>>16),s=(s&65535)+c*a,i+=s>>>16,s&=65535,i+=y*n,h=0+(i>>>16),i=(i&65535)+l*a,h+=i>>>16,i&=65535,i+=c*p,h+=i>>>16,i&=65535,h=h+(w*n+y*a+l*p+c*b)&65535,t(s<<16|v&65535,h<<16|i,this.unsigned)};n.mul=n.multiply;n.divide=function(n){var t,i,v;if(u(n)||(n=o(n)),n.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?s:e;if(this.unsigned)n.unsigned||(n=n.toUnsigned());else{if(this.eq(r))return n.eq(c)||n.eq(a)?r:n.eq(r)?c:(t=this.shr(1).div(n).shl(1),t.eq(e))?n.isNegative()?c:a:(i=this.sub(n.mul(t)),t.add(i.div(n)));if(n.eq(r))return this.unsigned?s:e;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg()}if(this.unsigned){if(n.gt(this))return s;if(n.gt(this.shru(1)))return w;v=s}else v=e;for(i=this;i.gte(n);){t=Math.max(1,Math.floor(i.toNumber()/n.toNumber()));for(var p=Math.ceil(Math.log(t)/Math.LN2),p=48>=p?1:l(2,p-48),h=f(t),y=h.mul(n);y.isNegative()||y.gt(i);)t-=p,h=f(t,this.unsigned),y=h.mul(n);h.isZero()&&(h=c);v=v.add(h);i=i.sub(y)}return v};n.div=n.divide;n.modulo=function(n){return u(n)||(n=o(n)),this.sub(this.div(n).mul(n))};n.mod=n.modulo;n.not=function(){return t(~this.low,~this.high,this.unsigned)};n.and=function(n){return u(n)||(n=o(n)),t(this.low&n.low,this.high&n.high,this.unsigned)};n.or=function(n){return u(n)||(n=o(n)),t(this.low|n.low,this.high|n.high,this.unsigned)};n.xor=function(n){return u(n)||(n=o(n)),t(this.low^n.low,this.high^n.high,this.unsigned)};n.shiftLeft=function(n){return u(n)&&(n=n.toInt()),0==(n&=63)?this:32>n?t(this.low<>>32-n,this.unsigned):t(0,this.low<n?t(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):t(this.high>>n-32,0<=this.high?0:-1,this.unsigned)};n.shr=n.shiftRight;n.shiftRightUnsigned=function(n){if(u(n)&&(n=n.toInt()),n&=63,0===n)return this;var i=this.high;return 32>n?t(this.low>>>n|i<<32-n,i>>>n,this.unsigned):32===n?t(i,0,this.unsigned):t(i>>>n-32,0,this.unsigned)};n.shru=n.shiftRightUnsigned;n.toSigned=function(){return this.unsigned?t(this.low,this.high,!1):this};n.toUnsigned=function(){return this.unsigned?this:t(this.low,this.high,!0)}}(Bridge.global);System.Int64=function(n){if(this.constructor!==System.Int64)return new System.Int64(n);Bridge.hasValue(n)||(n=0);this.T=System.Int64;this.unsigned=!1;this.value=System.Int64.getValue(n)};System.Int64.$$name="System.Int64";System.Int64.prototype.$$name="System.Int64";System.Int64.$kind="struct";System.Int64.prototype.$kind="struct";System.Int64.$$inherits=[];Bridge.Class.addExtend(System.Int64,[System.IComparable,System.IFormattable,System.IComparable$1(System.Int64),System.IEquatable$1(System.Int64)]);System.Int64.$is=function(n){return n instanceof System.Int64};System.Int64.is64Bit=function(n){return n instanceof System.Int64||n instanceof System.UInt64};System.Int64.is64BitType=function(n){return n===System.Int64||n===System.UInt64};System.Int64.getDefaultValue=function(){return System.Int64.Zero};System.Int64.getValue=function(n){return Bridge.hasValue(n)?n instanceof Bridge.$Long?n:n instanceof System.Int64?n.value:n instanceof System.UInt64?n.value.toSigned():Bridge.isArray(n)?new Bridge.$Long(n[0],n[1]):Bridge.isString(n)?Bridge.$Long.fromString(n):Bridge.isNumber(n)?Bridge.$Long.fromNumber(n):n instanceof System.Decimal?Bridge.$Long.fromString(n.toString()):Bridge.$Long.fromValue(n):null};System.Int64.create=function(n){return Bridge.hasValue(n)?n instanceof System.Int64?n:new System.Int64(n):null};System.Int64.lift=function(n){return Bridge.hasValue(n)?System.Int64.create(n):null};System.Int64.toNumber=function(n){return n?n.toNumber():null};System.Int64.prototype.toNumberDivided=function(n){var t=this.div(n),i=this.mod(n),r=i.toNumber()/n;return t.toNumber()+r};System.Int64.prototype.toJSON=function(){return this.toNumber()};System.Int64.prototype.toString=function(n,t){return!n&&!t?this.value.toString():Bridge.isNumber(n)&&!t?this.value.toString(n):Bridge.Int.format(this,n,t)};System.Int64.prototype.format=function(n,t){return Bridge.Int.format(this,n,t)};System.Int64.prototype.isNegative=function(){return this.value.isNegative()};System.Int64.prototype.abs=function(){if(this.T===System.Int64&&this.eq(System.Int64.MinValue))throw new System.OverflowException;return new this.T(this.value.isNegative()?this.value.neg():this.value)};System.Int64.prototype.compareTo=function(n){return this.value.compare(this.T.getValue(n))};System.Int64.prototype.add=function(n,t){var i=this.T.getValue(n),r=new this.T(this.value.add(i));if(t){var u=this.value.isNegative(),f=i.isNegative(),e=r.value.isNegative();if(u&&f&&!e||!u&&!f&&e||this.T===System.UInt64&&r.lt(System.UInt64.max(this,i)))throw new System.OverflowException;}return r};System.Int64.prototype.sub=function(n,t){var i=this.T.getValue(n),r=new this.T(this.value.sub(i));if(t){var u=this.value.isNegative(),f=i.isNegative(),e=r.value.isNegative();if(u&&!f&&!e||!u&&f&&e||this.T===System.UInt64&&this.value.lt(i))throw new System.OverflowException;}return r};System.Int64.prototype.isZero=function(){return this.value.isZero()};System.Int64.prototype.mul=function(n,t){var i=this.T.getValue(n),r=new this.T(this.value.mul(i)),u;if(t){var f=this.sign(),e=i.isZero()?0:i.isNegative()?-1:1,o=r.sign();if(this.T===System.Int64){if(this.eq(System.Int64.MinValue)||this.eq(System.Int64.MaxValue)){if(i.neq(1)&&i.neq(0))throw new System.OverflowException;return r}if(i.eq(Bridge.$Long.MIN_VALUE)||i.eq(Bridge.$Long.MAX_VALUE)){if(this.neq(1)&&this.neq(0))throw new System.OverflowException;return r}if(f===-1&&e===-1&&o!==1||f===1&&e===1&&o!==1||f===-1&&e===1&&o!==-1||f===1&&e===-1&&o!==-1)throw new System.OverflowException;if(u=r.abs(),u.lt(this.abs())||u.lt(System.Int64(i).abs()))throw new System.OverflowException;}else{if(this.eq(System.UInt64.MaxValue)){if(i.neq(1)&&i.neq(0))throw new System.OverflowException;return r}if(i.eq(Bridge.$Long.MAX_UNSIGNED_VALUE)){if(this.neq(1)&&this.neq(0))throw new System.OverflowException;return r}if(u=r.abs(),u.lt(this.abs())||u.lt(System.Int64(i).abs()))throw new System.OverflowException;}}return r};System.Int64.prototype.div=function(n){return new this.T(this.value.div(this.T.getValue(n)))};System.Int64.prototype.mod=function(n){return new this.T(this.value.mod(this.T.getValue(n)))};System.Int64.prototype.neg=function(n){if(n&&this.T===System.Int64&&this.eq(System.Int64.MinValue))throw new System.OverflowException;return new this.T(this.value.neg())};System.Int64.prototype.inc=function(n){return this.add(1,n)};System.Int64.prototype.dec=function(n){return this.sub(1,n)};System.Int64.prototype.sign=function(){return this.value.isZero()?0:this.value.isNegative()?-1:1};System.Int64.prototype.clone=function(){return new this.T(this)};System.Int64.prototype.ne=function(n){return this.value.neq(this.T.getValue(n))};System.Int64.prototype.neq=function(n){return this.value.neq(this.T.getValue(n))};System.Int64.prototype.eq=function(n){return this.value.eq(this.T.getValue(n))};System.Int64.prototype.lt=function(n){return this.value.lt(this.T.getValue(n))};System.Int64.prototype.lte=function(n){return this.value.lte(this.T.getValue(n))};System.Int64.prototype.gt=function(n){return this.value.gt(this.T.getValue(n))};System.Int64.prototype.gte=function(n){return this.value.gte(this.T.getValue(n))};System.Int64.prototype.equals=function(n){return this.value.eq(this.T.getValue(n))};System.Int64.prototype.equalsT=function(n){return this.equals(n)};System.Int64.prototype.getHashCode=function(){var n=this.sign()*397+this.value.high|0;return n*397+this.value.low|0};System.Int64.prototype.toNumber=function(){return this.value.toNumber()};System.Int64.parse=function(n){if(n==null)throw new System.ArgumentNullException("str");if(!/^[+-]?[0-9]+$/.test(n))throw new System.FormatException("Input string was not in a correct format.");var t=new System.Int64(n);if(n!==t.toString())throw new System.OverflowException;return t};System.Int64.tryParse=function(n,t){try{return n==null||!/^[+-]?[0-9]+$/.test(n)?(t.v=System.Int64(Bridge.$Long.ZERO),!1):(t.v=new System.Int64(n),n!==t.v.toString())?(t.v=System.Int64(Bridge.$Long.ZERO),!1):!0}catch(i){return t.v=System.Int64(Bridge.$Long.ZERO),!1}};System.Int64.divRem=function(n,t,i){n=System.Int64(n);t=System.Int64(t);var r=n.mod(t);return i.v=r,n.sub(r).div(t)};System.Int64.min=function(){for(var t=[],i,n=0,r=arguments.length;n>>0:Bridge.Int.isInfinite(n)?System.UInt32.min:null};System.Int64.clip64=function(n){return n?new System.Int64(n.value.toSigned()):Bridge.Int.isInfinite(n)?System.Int64.MinValue:null};System.Int64.clipu64=function(n){return n?new System.UInt64(n.value.toUnsigned()):Bridge.Int.isInfinite(n)?System.UInt64.MinValue:null};System.Int64.Zero=System.Int64(Bridge.$Long.ZERO);System.Int64.MinValue=System.Int64(Bridge.$Long.MIN_VALUE);System.Int64.MaxValue=System.Int64(Bridge.$Long.MAX_VALUE);System.Int64.precision=19;System.UInt64=function(n){if(this.constructor!==System.UInt64)return new System.UInt64(n);Bridge.hasValue(n)||(n=0);this.T=System.UInt64;this.unsigned=!0;this.value=System.UInt64.getValue(n,!0)};System.UInt64.$$name="System.UInt64";System.UInt64.prototype.$$name="System.UInt64";System.UInt64.$kind="struct";System.UInt64.prototype.$kind="struct";System.UInt64.$$inherits=[];Bridge.Class.addExtend(System.UInt64,[System.IComparable,System.IFormattable,System.IComparable$1(System.UInt64),System.IEquatable$1(System.UInt64)]);System.UInt64.$is=function(n){return n instanceof System.UInt64};System.UInt64.getDefaultValue=function(){return System.UInt64.Zero};System.UInt64.getValue=function(n){return Bridge.hasValue(n)?n instanceof Bridge.$Long?n:n instanceof System.UInt64?n.value:n instanceof System.Int64?n.value.toUnsigned():Bridge.isArray(n)?new Bridge.$Long(n[0],n[1],!0):Bridge.isString(n)?Bridge.$Long.fromString(n,!0):Bridge.isNumber(n)?Bridge.$Long.fromNumber(n,!0):n instanceof System.Decimal?Bridge.$Long.fromString(n.toString(),!0):Bridge.$Long.fromValue(n):null};System.UInt64.create=function(n){return Bridge.hasValue(n)?n instanceof System.UInt64?n:new System.UInt64(n):null};System.UInt64.lift=function(n){return Bridge.hasValue(n)?System.UInt64.create(n):null};System.UInt64.prototype.toJSON=System.Int64.prototype.toJSON;System.UInt64.prototype.toString=System.Int64.prototype.toString;System.UInt64.prototype.format=System.Int64.prototype.format;System.UInt64.prototype.isNegative=System.Int64.prototype.isNegative;System.UInt64.prototype.abs=System.Int64.prototype.abs;System.UInt64.prototype.compareTo=System.Int64.prototype.compareTo;System.UInt64.prototype.add=System.Int64.prototype.add;System.UInt64.prototype.sub=System.Int64.prototype.sub;System.UInt64.prototype.isZero=System.Int64.prototype.isZero;System.UInt64.prototype.mul=System.Int64.prototype.mul;System.UInt64.prototype.div=System.Int64.prototype.div;System.UInt64.prototype.toNumberDivided=System.Int64.prototype.toNumberDivided;System.UInt64.prototype.mod=System.Int64.prototype.mod;System.UInt64.prototype.neg=System.Int64.prototype.neg;System.UInt64.prototype.inc=System.Int64.prototype.inc;System.UInt64.prototype.dec=System.Int64.prototype.dec;System.UInt64.prototype.sign=System.Int64.prototype.sign;System.UInt64.prototype.clone=System.Int64.prototype.clone;System.UInt64.prototype.ne=System.Int64.prototype.ne;System.UInt64.prototype.neq=System.Int64.prototype.neq;System.UInt64.prototype.eq=System.Int64.prototype.eq;System.UInt64.prototype.lt=System.Int64.prototype.lt;System.UInt64.prototype.lte=System.Int64.prototype.lte;System.UInt64.prototype.gt=System.Int64.prototype.gt;System.UInt64.prototype.gte=System.Int64.prototype.gte;System.UInt64.prototype.equals=System.Int64.prototype.equals;System.UInt64.prototype.equalsT=System.Int64.prototype.equalsT;System.UInt64.prototype.getHashCode=System.Int64.prototype.getHashCode;System.UInt64.prototype.toNumber=System.Int64.prototype.toNumber;System.UInt64.parse=function(n){if(n==null)throw new System.ArgumentNullException("str");if(!/^[+-]?[0-9]+$/.test(n))throw new System.FormatException("Input string was not in a correct format.");var t=new System.UInt64(n);if(t.value.isNegative())throw new System.OverflowException;if(n!==t.toString())throw new System.OverflowException;return t};System.UInt64.tryParse=function(n,t){try{return n==null||!/^[+-]?[0-9]+$/.test(n)?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):(t.v=new System.UInt64(n),t.v.isNegative())?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):n!==t.v.toString()?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):!0}catch(i){return t.v=System.UInt64(Bridge.$Long.UZERO),!1}};System.UInt64.min=function(){for(var t=[],i,n=0,r=arguments.length;n0){for(e+=t,u=1;o>u;u++)f=n[u]+"",i=r-f.length,i&&(e+=p(i)),e+=f;t=n[u];f=t+"";i=r-f.length;i&&(e+=p(i))}else if(0===t)return"0";for(;t%10==0;)t/=10;return e+t}function h(n,t,i){if(n!==~~n||t>n||n>i)throw Error(k+n);}function nt(n,t,i,u){for(var o,h,f,e=n[0];e>=10;e/=10)--t;return--t<0?(t+=r,o=0):(o=Math.ceil((t+1)/r),t%=r),e=s(10,r-t),f=n[o]%e|0,null==u?3>t?(0==t?f=f/100|0:1==t&&(f=f/10|0),h=4>i&&99999==f||i>3&&49999==f||5e4==f||0==f):h=(4>i&&f+1==e||i>3&&f+1==e/2)&&(n[o+1]/e/100|0)==s(10,t-2)-1||(f==e/2||0==f)&&0==(n[o+1]/e/100|0):4>t?(0==t?f=f/1e3|0:1==t?f=f/100|0:2==t&&(f=f/10|0),h=(u||4>i)&&9999==f||!u&&i>3&&4999==f):h=((u||4>i)&&f+1==e||!u&&i>3&&f+1==e/2)&&(n[o+1]/e/1e3|0)==s(10,t-3)-1,h}function tt(n,t,i){for(var u,f,r=[0],e=0,o=n.length;o>e;){for(f=r.length;f--;)r[f]*=t;for(r[0]+=ht.indexOf(n.charAt(e++)),u=0;ui-1&&(void 0===r[u+1]&&(r[u+1]=0),r[u+1]+=r[u]/i|0,r[u]%=i)}return r.reverse()}function ri(n,t){var i,u,f=t.d.length,e,r;for(32>f?(i=Math.ceil(f/3),u=Math.pow(4,-i).toString()):(i=16,u="2.3283064365386962890625e-10"),n.precision+=i,t=d(n,1,t.times(u),new n(1)),e=i;e--;)r=t.times(t),t=r.times(r).minus(r).times(8).plus(1);return n.precision-=i,t}function i(n,t,i,f){var v,c,o,h,p,w,y,e,l,b=n.constructor;n:if(null!=t){if(e=n.d,!e)return n;for(v=1,h=e[0];h>=10;h/=10)v++;if(c=t-v,0>c)c+=r,o=t,y=e[l=0],p=y/s(10,v-o-1)%10|0;else if(l=Math.ceil((c+1)/r),h=e.length,l>=h){if(!f)break n;for(;h++<=l;)e.push(0);y=p=0;v=1;c%=r;o=c-r+1}else{for(y=h=e[l],v=1;h>=10;h/=10)v++;c%=r;o=c-r+v;p=0>o?0:y/s(10,v-o-1)%10|0}if(f=f||0>t||void 0!==e[l+1]||(0>o?y:y%s(10,v-o-1)),w=4>i?(p||f)&&(0==i||i==(n.s<0?3:2)):p>5||5==p&&(4==i||f||6==i&&(c>0?o>0?y/s(10,v-o):0:e[l-1])%10&1||i==(n.s<0?8:7)),1>t||!e[0])return e.length=0,w?(t-=n.e+1,e[0]=s(10,(r-t%r)%r),n.e=-t||0):e[0]=n.e=0,n;if(0==c?(e.length=l,h=1,l--):(e.length=l+1,h=s(10,r-c),e[l]=o>0?(y/s(10,v-o)%s(10,o)|0)*h:0),w)for(;;){if(0==l){for(c=1,o=e[0];o>=10;o/=10)c++;for(o=e[0]+=h,h=1;o>=10;o/=10)h++;c!=h&&(n.e++,e[0]==a&&(e[0]=1));break}if(e[l]+=h,e[l]!=a)break;e[l--]=0;h=1}for(c=e.length;0===e[--c];)e.pop()}return u&&(n.e>b.maxE?(n.d=null,n.e=NaN):n.e0?r=r.charAt(0)+"."+r.slice(1)+p(u):f>1&&(r=r.charAt(0)+"."+r.slice(1)),r=r+(n.e<0?"e":"e+")+n.e):0>o?(r="0."+p(-o-1)+r,i&&(u=i-f)>0&&(r+=p(u))):o>=f?(r+=p(o+1-f),i&&(u=i-o-1)>0&&(r=r+"."+p(u))):((u=o+1)0&&(o+1===f&&(r+="."),r+=p(u))),r}function it(n,t){for(var i=1,u=n[0];u>=10;u/=10)i++;return i+t*r-1}function rt(n,t,r){if(t>eu)throw u=!0,r&&(n.precision=r),Error(ti);return i(new n(ut),t,1,!0)}function l(n,t,r){if(t>ct)throw Error(ti);return i(new n(ft),t,r,!0)}function lt(n){var t=n.length-1,i=t*r+1;if(t=n[t]){for(;t%10==0;t/=10)i--;for(t=n[0];t>=10;t/=10)i++}return i}function p(n){for(var t="";n--;)t+="0";return t}function at(n,t,i,f){var s,e=new n(1),h=Math.ceil(f/r+4);for(u=!1;;){if(i%2&&(e=e.times(t),kt(e.d,h)&&(s=!0)),i=o(i/2),0===i){i=e.d.length-1;s&&0===e.d[i]&&++e.d[i];break}t=t.times(t);kt(t.d,h)}return u=!0,e}function vt(n){return 1&n.d[n.d.length-1]}function yt(n,t,i){for(var r,u=new n(t[0]),f=0;++f17)return new h(n.d?n.d[0]?n.s<0?0:1/0:1:n.s?n.s<0?0:n:NaN);for(null==t?(u=!1,r=w):r=t,c=new h(.03125);n.e>-2;)n=n.times(c),p+=5;for(v=Math.log(s(2,p))/Math.LN10*2+5|0,r+=v,l=a=o=new h(1),h.precision=r;;){if(a=i(a.times(n),r,1),l=l.times(++k),c=o.plus(f(a,l,r,1)),e(c.d).slice(0,r)===e(o.d).slice(0,r)){for(b=p;b--;)o=i(o.times(o),r,1);if(null!=t)return h.precision=w,o;if(!(3>y&&nt(o.d,r-v,d,y)))return i(o,h.precision=w,d,u=!0);h.precision=r+=10;l=a=c=new h(1);k=0;y++}o=c}}function w(n,t){var c,l,k,y,b,ut,h,p,o,g,tt,ft=1,d=10,r=n,a=r.d,s=r.constructor,it=s.rounding,v=s.precision;if(r.s<0||!a||!a[0]||!r.e&&1==a[0]&&1==a.length)return new s(a&&!a[0]?-1/0:1!=r.s?NaN:a?0:r);if(null==t?(u=!1,o=v):o=t,s.precision=o+=d,c=e(a),l=c.charAt(0),!(Math.abs(y=r.e)<15e14))return p=rt(s,o+2,v).times(y+""),r=w(new s(l+"."+c.slice(1)),o-d).plus(p),s.precision=v,null==t?i(r,v,it,u=!0):r;for(;7>l&&1!=l||1==l&&c.charAt(1)>3;)r=r.times(n),c=e(r.d),l=c.charAt(0),ft++;for(y=r.e,l>1?(r=new s("0."+c),y++):r=new s(l+"."+c.slice(1)),g=r,h=b=r=f(r.minus(1),r.plus(1),o,1),tt=i(r.times(r),o,1),k=3;;){if(b=i(b.times(tt),o,1),p=h.plus(f(b,new s(k),o,1)),e(p.d).slice(0,o)===e(h.d).slice(0,o)){if(h=h.times(2),0!==y&&(h=h.plus(rt(s,o+2,v).times(y+""))),h=f(h,new s(ft),o,1),null!=t)return s.precision=v,h;if(!nt(h.d,o-d,it,ut))return i(h,s.precision=v,it,u=!0);s.precision=o+=d;p=b=r=f(g.minus(1),g.plus(1),o,1);tt=i(r.times(r),o,1);k=ut=1}h=p;k+=2}}function pt(n){return String(n.s*n.s/0)}function wt(n,t){var f,i,e;for((f=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(0>f&&(f=i),f+=+t.slice(i+1),t=t.substring(0,i)):0>f&&(f=t.length),i=0;48===t.charCodeAt(i);i++);for(e=t.length;48===t.charCodeAt(e-1);--e);if(t=t.slice(i,e)){if(e-=i,n.e=f=f-i-1,n.d=[],i=(f+1)%r,0>f&&(i+=r),e>i){for(i&&n.d.push(+t.slice(0,i)),e-=r;e>i;)n.d.push(+t.slice(i,i+=r));t=t.slice(i);i=r-t.length}else i-=e;for(;i--;)t+="0";n.d.push(+t);u&&(n.e>n.constructor.maxE?(n.d=null,n.e=NaN):n.e0?(o=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),h=i>=0,s=n.constructor,h&&(t=t.replace(".",""),l=t.length,i=l-i,y=at(s,new s(e),i,2*i)),r=tt(t,e,a),v=r.length-1,i=v;0===r[i];--i)r.pop();return 0>i?new s(0*n.s):(n.e=it(r,v),n.d=r,u=!1,h&&(n=f(n,y,4*l)),o&&(n=n.times(Math.abs(o)<54?Math.pow(2,o):c.pow(2,o))),u=!0,n)}function fi(n,t){var i,u=t.d.length;if(3>u)return d(n,2,t,t);i=1.4*Math.sqrt(u);i=i>16?16:0|i;t=t.times(Math.pow(5,-i));t=d(n,2,t,t);for(var r,f=new n(5),e=new n(16),o=new n(20);i--;)r=t.times(t),t=t.times(f.plus(r.times(e.times(r).minus(o))));return t}function d(n,t,i,e,o){var h,s,c,l,y=1,a=n.precision,v=Math.ceil(a/r);for(u=!1,l=i.times(i),c=new n(e);;){if(s=f(c.times(l),new n(t++*t++),a,1),c=o?e.plus(s):e.minus(s),e=f(s.times(l),new n(t++*t++),a,1),s=c.plus(e),void 0!==s.d[v]){for(h=v;s.d[h]===c.d[h]&&h--;);if(-1==h)break}h=c;c=e;e=s;s=h;y++}return u=!0,s.d.length=v+1,s}function bt(n,t){var r,i=t.s<0,u=l(n,n.precision,1),f=u.times(.5);if(t=t.abs(),t.lte(f))return y=i?4:1,t;if(r=t.divToInt(u),r.isZero())y=i?3:2;else{if(t=t.minus(r.times(u)),t.lte(f))return y=vt(r)?i?2:3:i?4:1,t;y=vt(r)?i?1:4:i?3:2}return t.minus(u).abs()}function st(n,t,i,r){var l,c,o,k,s,a,u,e,y,p=n.constructor,w=void 0!==i;if(w?(h(i,1,b),void 0===r?r=p.rounding:h(r,0,8)):(i=p.precision,r=p.rounding),n.isFinite()){for(u=v(n),o=u.indexOf("."),w?(l=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):l=t,o>=0&&(u=u.replace(".",""),y=new p(1),y.e=u.length-o,y.d=tt(v(y),10,l),y.e=y.d.length),e=tt(u,10,l),c=s=e.length;0==e[--s];)e.pop();if(e[0]){if(0>o?c--:(n=new p(n),n.d=e,n.e=c,n=f(n,y,i,r,0,l),e=n.d,c=n.e,a=gt),o=e[i],k=l/2,a=a||void 0!==e[i+1],a=4>r?(void 0!==o||a)&&(0===r||r===(n.s<0?3:2)):o>k||o===k&&(4===r||a||6===r&&1&e[i-1]||r===(n.s<0?8:7)),e.length=i,a)for(;++e[--i]>l-1;)e[i]=0,i||(++c,e.unshift(1));for(s=e.length;!e[s-1];--s);for(o=0,u="";s>o;o++)u+=ht.charAt(e[o]);if(w){if(s>1)if(16==t||8==t){for(o=16==t?4:3,--s;s%o;s++)u+="0";for(e=tt(u,l,t),s=e.length;!e[s-1];--s);for(o=1,u="1.";s>o;o++)u+=ht.charAt(e[o])}else u=u.charAt(0)+"."+u.slice(1);u=u+(0>c?"p":"p+")+c}else if(0>c){for(;++c;)u="0"+u;u="0."+u}else if(++c>s)for(c-=s;c--;)u+="0";else s>c&&(u=u.slice(0,c)+"."+u.slice(c))}else u=w?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=pt(n);return n.s<0?"-"+u:u}function kt(n,t){if(n.length>t)return(n.length=t,!0)}function ei(n){return new this(n).abs()}function oi(n){return new this(n).acos()}function si(n){return new this(n).acosh()}function hi(n,t){return new this(n).plus(t)}function ci(n){return new this(n).asin()}function li(n){return new this(n).asinh()}function ai(n){return new this(n).atan()}function vi(n){return new this(n).atanh()}function yi(n,t){n=new this(n);t=new this(t);var i,u=this.precision,e=this.rounding,r=u+4;return n.s&&t.s?n.d||t.d?!t.d||n.isZero()?(i=t.s<0?l(this,u,e):new this(0),i.s=n.s):!n.d||t.isZero()?(i=l(this,r,1).times(.5),i.s=n.s):t.s<0?(this.precision=r,this.rounding=1,i=this.atan(f(n,t,r,1)),t=l(this,r,1),this.precision=u,this.rounding=e,i=n.s<0?i.minus(t):i.plus(t)):i=this.atan(f(n,t,r,1)):(i=l(this,r,1).times(t.s>0?.25:.75),i.s=n.s):i=new this(NaN),i}function pi(n){return new this(n).cbrt()}function wi(n){return i(n=new this(n),n.e+1,2)}function bi(n){if(!n||"object"!=typeof n)throw Error(et+"Object expected");for(var i,t,u=["precision",1,b,"rounding",0,8,"toExpNeg",-g,0,"toExpPos",0,g,"maxE",0,g,"minE",-g,0,"modulo",0,9],r=0;r=u[r+1]&&t<=u[r+2]))throw Error(k+i+": "+t);this[i]=t}if(void 0!==(t=n[i="crypto"])){if(t!==!0&&t!==!1&&0!==t&&1!==t)throw Error(k+i+": "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(ii);this[i]=!0}else this[i]=!1}return this}function ki(n){return new this(n).cos()}function di(n){return new this(n).cosh()}function dt(n){function i(n){var r,u,f,t=this;if(!(t instanceof i))return new i(n);if(t.constructor=i,n instanceof i)return t.s=n.s,t.e=n.e,void(t.d=(n=n.d)?n.slice():n);if(f=typeof n,"number"===f){if(0===n)return t.s=0>1/n?-1:1,t.e=0,void(t.d=[0]);if(0>n?(n=-n,t.s=-1):t.s=1,n===~~n&&1e7>n){for(r=0,u=n;u>=10;u/=10)r++;return t.e=r,void(t.d=[n])}return 0*n!=0?(n||(t.s=NaN),t.e=NaN,void(t.d=null)):wt(t,n.toString())}if("string"!==f)throw Error(k+n);return 45===n.charCodeAt(0)?(n=n.slice(1),t.s=-1):t.s=1,uu.test(n)?wt(t,n):ui(t,n)}var r,u,f;if(i.prototype=t,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=bi,i.clone=dt,i.abs=ei,i.acos=oi,i.acosh=si,i.add=hi,i.asin=ci,i.asinh=li,i.atan=ai,i.atanh=vi,i.atan2=yi,i.cbrt=pi,i.ceil=wi,i.cos=ki,i.cosh=di,i.div=gi,i.exp=nr,i.floor=tr,i.hypot=ir,i.ln=rr,i.log=ur,i.log10=er,i.log2=fr,i.max=or,i.min=sr,i.mod=hr,i.mul=cr,i.pow=lr,i.random=ar,i.round=vr,i.sign=yr,i.sin=pr,i.sinh=wr,i.sqrt=br,i.sub=kr,i.tan=dr,i.tanh=gr,i.trunc=nu,void 0===n&&(n={}),n)for(f=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;rt;)u=e[t],u>=429e7?e[t]=crypto.getRandomValues(new Uint32Array(1))[0]:f[t++]=u%1e7;else{if(!crypto.randomBytes)throw Error(ii);for(e=crypto.randomBytes(i*=4);i>t;)u=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+((127&e[t+3])<<24),u>=214e7?crypto.randomBytes(4).copy(e,t):(f.push(u%1e7),t+=4);t=i/4}else for(;i>t;)f[t++]=1e7*Math.random()|0;for(i=f[--t],n%=r,i&&n&&(u=s(10,r-n),f[t]=(i/u|0)*u);0===f[t];t--)f.pop();if(0>t)o=0,f=[0];else{for(o=-1;0===f[0];o-=r)f.shift();for(i=1,u=f[0];u>=10;u/=10)i++;r>i&&(o-=r-i)}return c.e=o,c.d=f,c}function vr(n){return i(n=new this(n),n.e+1,this.rounding)}function yr(n){return n=new this(n),n.d?n.d[0]?n.s:0*n.s:n.s||NaN}function pr(n){return new this(n).sin()}function wr(n){return new this(n).sinh()}function br(n){return new this(n).sqrt()}function kr(n,t){return new this(n).sub(t)}function dr(n){return new this(n).tan()}function gr(n){return new this(n).tanh()}function nu(n){return i(n=new this(n),n.e+1,1)}var gt,ni,y,g=9e15,b=1e9,ht="0123456789abcdef",ut="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",ft="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-g,maxE:g,crypto:!1},u=!0,et="[DecimalError] ",k=et+"Invalid argument: ",ti=et+"Precision limit exceeded",ii=et+"crypto unavailable",o=Math.floor,s=Math.pow,tu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,iu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ru=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,a=1e7,r=7,fu=9007199254740991,eu=ut.length-1,ct=ft.length-1,t={},f;t.absoluteValue=t.abs=function(){var n=new this.constructor(this);return n.s<0&&(n.s=1),i(n)};t.ceil=function(){return i(new this.constructor(this),this.e+1,2)};t.comparedTo=t.cmp=function(n){var r,h,f,e,o=this,i=o.d,u=(n=new o.constructor(n)).d,t=o.s,s=n.s;if(!i||!u)return t&&s?t!==s?t:i===u?0:!i^0>t?1:-1:NaN;if(!i[0]||!u[0])return i[0]?t:u[0]?-s:0;if(t!==s)return t;if(o.e!==n.e)return o.e>n.e^0>t?1:-1;for(f=i.length,e=u.length,r=0,h=e>f?f:e;h>r;++r)if(i[r]!==u[r])return i[r]>u[r]^0>t?1:-1;return f===e?0:f>e^0>t?1:-1};t.cosine=t.cos=function(){var u,f,t=this,n=t.constructor;return t.d?t.d[0]?(u=n.precision,f=n.rounding,n.precision=u+Math.max(t.e,t.sd())+r,n.rounding=1,t=ri(n,bt(n,t)),n.precision=u,n.rounding=f,i(2==y||3==y?t.neg():t,u,f,!0)):new n(1):new n(NaN)};t.cubeRoot=t.cbrt=function(){var r,w,n,s,v,c,l,h,y,p,t=this,a=t.constructor;if(!t.isFinite()||t.isZero())return new a(t);for(u=!1,c=t.s*Math.pow(t.s*t,1/3),c&&Math.abs(c)!=1/0?s=new a(c.toString()):(n=e(t.d),r=t.e,(c=(r-n.length+1)%3)&&(n+=1==c||-2==c?"0":"00"),c=Math.pow(n,1/3),r=o((r+1)/3)-(r%3==(0>r?-1:2)),c==1/0?n="5e"+r:(n=c.toExponential(),n=n.slice(0,n.indexOf("e")+1)+r),s=new a(n),s.s=t.s),l=(r=a.precision)+3;;)if(h=s,y=h.times(h).times(h),p=y.plus(t),s=f(p.plus(t).times(h),p.plus(y),l+2,1),e(h.d).slice(0,l)===(n=e(s.d)).slice(0,l)){if(n=n.slice(l-3,l+1),"9999"!=n&&(v||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(i(s,r+1,1),w=!s.times(s).times(s).eq(t));break}if(!v&&(i(h,r+1,0),h.times(h).times(h).eq(t))){s=h;break}l+=4;v=1}return u=!0,i(s,r,a.rounding,w)};t.decimalPlaces=t.dp=function(){var n,i=this.d,t=NaN;if(i){if(n=i.length-1,t=(n-o(this.e/r))*r,n=i[n])for(;n%10==0;n/=10)t--;0>t&&(t=0)}return t};t.dividedBy=t.div=function(n){return f(this,new this.constructor(n))};t.dividedToIntegerBy=t.divToInt=function(n){var r=this,t=r.constructor;return i(f(r,new t(n),0,1,1),t.precision,t.rounding)};t.equals=t.eq=function(n){return 0===this.cmp(n)};t.floor=function(){return i(new this.constructor(this),this.e+1,3)};t.greaterThan=t.gt=function(n){return this.cmp(n)>0};t.greaterThanOrEqualTo=t.gte=function(n){var t=this.cmp(n);return 1==t||0===t};t.hyperbolicCosine=t.cosh=function(){var r,u,f,h,e,n=this,t=n.constructor,c=new t(1),o,l,s;if(!n.isFinite())return new t(n.s?1/0:NaN);if(n.isZero())return c;for(f=t.precision,h=t.rounding,t.precision=f+Math.max(n.e,n.sd())+4,t.rounding=1,e=n.d.length,32>e?(r=Math.ceil(e/3),u=Math.pow(4,-r).toString()):(r=16,u="2.3283064365386962890625e-10"),n=d(t,1,n.times(u),new t(1),!0),l=r,s=new t(8);l--;)o=n.times(n),n=c.minus(o.times(s.minus(o.times(s))));return i(n,t.precision=f,t.rounding=h,!0)};t.hyperbolicSine=t.sinh=function(){var r,u,f,e,n=this,t=n.constructor;if(!n.isFinite()||n.isZero())return new t(n);if(u=t.precision,f=t.rounding,t.precision=u+Math.max(n.e,n.sd())+4,t.rounding=1,e=n.d.length,3>e)n=d(t,2,n,n,!0);else{r=1.4*Math.sqrt(e);r=r>16?16:0|r;n=n.times(Math.pow(5,-r));n=d(t,2,n,n,!0);for(var o,s=new t(5),h=new t(16),c=new t(20);r--;)o=n.times(n),n=n.times(s.plus(o.times(h.times(o).plus(c))))}return t.precision=u,t.rounding=f,i(n,u,f,!0)};t.hyperbolicTangent=t.tanh=function(){var i,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(i=n.precision,r=n.rounding,n.precision=i+7,n.rounding=1,f(t.sinh(),t.cosh(),n.precision=i,n.rounding=r)):new n(t.s)};t.inverseCosine=t.acos=function(){var u,t=this,n=t.constructor,f=t.abs().cmp(1),i=n.precision,r=n.rounding;return-1!==f?0===f?t.isNeg()?l(n,i,r):new n(0):new n(NaN):t.isZero()?l(n,i+4,r).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),u=l(n,i+4,r).times(.5),n.precision=i,n.rounding=r,u.minus(t))};t.inverseHyperbolicCosine=t.acosh=function(){var i,r,n=this,t=n.constructor;return n.lte(1)?new t(n.eq(1)?0:NaN):n.isFinite()?(i=t.precision,r=t.rounding,t.precision=i+Math.max(Math.abs(n.e),n.sd())+4,t.rounding=1,u=!1,n=n.times(n).minus(1).sqrt().plus(n),u=!0,t.precision=i,t.rounding=r,n.ln()):new t(n)};t.inverseHyperbolicSine=t.asinh=function(){var i,r,n=this,t=n.constructor;return!n.isFinite()||n.isZero()?new t(n):(i=t.precision,r=t.rounding,t.precision=i+2*Math.max(Math.abs(n.e),n.sd())+6,t.rounding=1,u=!1,n=n.times(n).plus(1).sqrt().plus(n),u=!0,t.precision=i,t.rounding=r,n.ln())};t.inverseHyperbolicTangent=t.atanh=function(){var r,u,o,e,n=this,t=n.constructor;return n.isFinite()?n.e>=0?new t(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(r=t.precision,u=t.rounding,e=n.sd(),Math.max(e,r)<2*-n.e-1?i(new t(n),r,u,!0):(t.precision=o=e-n.e,n=f(n.plus(1),new t(1).minus(n),o+r,1),t.precision=r+4,t.rounding=1,n=n.ln(),t.precision=r,t.rounding=u,n.times(.5))):new t(NaN)};t.inverseSine=t.asin=function(){var r,u,i,f,n=this,t=n.constructor;return n.isZero()?new t(n):(u=n.abs().cmp(1),i=t.precision,f=t.rounding,-1!==u?0===u?(r=l(t,i+4,f).times(.5),r.s=n.s,r):new t(NaN):(t.precision=i+6,t.rounding=1,n=n.div(new t(1).minus(n.times(n)).sqrt().plus(1)).atan(),t.precision=i,t.rounding=f,n.times(2)))};t.inverseTangent=t.atan=function(){var e,c,h,a,o,v,t,y,p,n=this,f=n.constructor,s=f.precision,w=f.rounding;if(n.isFinite()){if(n.isZero())return new f(n);if(n.abs().eq(1)&&ct>=s+4)return t=l(f,s+4,w).times(.25),t.s=n.s,t}else{if(!n.s)return new f(NaN);if(ct>=s+4)return t=l(f,s+4,w).times(.5),t.s=n.s,t}for(f.precision=y=s+10,f.rounding=1,h=Math.min(28,y/r+2|0),e=h;e;--e)n=n.div(n.times(n).plus(1).sqrt().plus(1));for(u=!1,c=Math.ceil(y/r),a=1,p=n.times(n),t=new f(n),o=n;-1!==e;)if(o=o.times(p),v=t.minus(o.div(a+=2)),o=o.times(p),t=v.plus(o.div(a+=2)),void 0!==t.d[c])for(e=c;t.d[e]===v.d[e]&&e--;);return h&&(t=t.times(2<this.d.length-2};t.isNaN=function(){return!this.s};t.isNegative=t.isNeg=function(){return this.s<0};t.isPositive=t.isPos=function(){return this.s>0};t.isZero=function(){return!!this.d&&0===this.d[0]};t.lessThan=t.lt=function(n){return this.cmp(n)<0};t.lessThanOrEqualTo=t.lte=function(n){return this.cmp(n)<1};t.logarithm=t.log=function(n){var l,t,a,o,p,v,r,s,c=this,h=c.constructor,y=h.precision,b=h.rounding;if(null==n)n=new h(10),l=!0;else{if(n=new h(n),t=n.d,n.s<0||!t||!t[0]||n.eq(1))return new h(NaN);l=n.eq(10)}if(t=c.d,c.s<0||!t||!t[0]||c.eq(1))return new h(t&&!t[0]?-1/0:1!=c.s?NaN:t?0:1/0);if(l)if(t.length>1)p=!0;else{for(o=t[0];o%10==0;)o/=10;p=1!==o}if(u=!1,r=y+5,v=w(c,r),a=l?rt(h,r+10):w(n,r),s=f(v,a,r,1),nt(s.d,o=y,b))do if(r+=10,v=w(c,r),a=l?rt(h,r+10):w(n,r),s=f(v,a,r,1),!p){+e(s.d).slice(o+1,o+15)+1==1e14&&(s=i(s,y+1,0));break}while(nt(s.d,o+=10,b));return u=!0,i(s,y,b)};t.minus=t.sub=function(n){var l,p,f,w,c,s,k,b,t,d,y,e,h=this,v=h.constructor;if(n=new v(n),!h.d||!n.d)return h.s&&n.s?h.d?n.s=-n.s:n=new v(n.d||h.s!==n.s?h:NaN):n=new v(NaN),n;if(h.s!=n.s)return n.s=-n.s,h.plus(n);if(t=h.d,e=n.d,k=v.precision,b=v.rounding,!t[0]||!e[0]){if(e[0])n.s=-n.s;else{if(!t[0])return new v(3===b?-0:0);n=new v(h)}return u?i(n,k,b):n}if(p=o(n.e/r),d=o(h.e/r),t=t.slice(),c=d-p){for(y=0>c,y?(l=t,c=-c,s=e.length):(l=e,p=d,s=t.length),f=Math.max(Math.ceil(k/r),s)+2,c>f&&(c=f,l.length=1),l.reverse(),f=c;f--;)l.push(0);l.reverse()}else{for(f=t.length,s=e.length,y=s>f,y&&(s=f),f=0;s>f;f++)if(t[f]!=e[f]){y=t[f]0;--f)t[s++]=0;for(f=e.length;f>c;){if(t[--f]f?(c=t,f=-f,e=h.length):(c=h,p=l,e=t.length),l=Math.ceil(w/r),e=l>e?l+1:e+1,f>e&&(f=e,c.length=1),c.reverse();f--;)c.push(0);c.reverse()}for(e=t.length,f=h.length,0>e-f&&(f=e,c=h,h=t,t=c),y=0;f;)y=(t[--f]=t[f]+h[f]+y)/a|0,t[f]%=a;for(y&&(t.unshift(y),++p),e=t.length;0==t[--e];)t.pop();return n.d=t,n.e=it(t,p),u?i(n,w,b):n};t.precision=t.sd=function(n){var t,i=this;if(void 0!==n&&n!==!!n&&1!==n&&0!==n)throw Error(k+n);return i.d?(t=lt(i.d),n&&i.e+1>t&&(t=i.e+1)):t=NaN,t};t.round=function(){var n=this,t=n.constructor;return i(new t(n),n.e+1,t.rounding)};t.sine=t.sin=function(){var u,f,n=this,t=n.constructor;return n.isFinite()?n.isZero()?new t(n):(u=t.precision,f=t.rounding,t.precision=u+Math.max(n.e,n.sd())+r,t.rounding=1,n=fi(t,bt(t,n)),t.precision=u,t.rounding=f,i(y>2?n.neg():n,u,f,!0)):new t(NaN)};t.squareRoot=t.sqrt=function(){var p,n,l,r,y,c,h=this,a=h.d,t=h.e,s=h.s,v=h.constructor;if(1!==s||!a||!a[0])return new v(!s||0>s&&(!a||a[0])?NaN:a?h:1/0);for(u=!1,s=Math.sqrt(+h),0==s||s==1/0?(n=e(a),(n.length+t)%2==0&&(n+="0"),s=Math.sqrt(n),t=o((t+1)/2)-(0>t||t%2),s==1/0?n="1e"+t:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+t),r=new v(n)):r=new v(s.toString()),l=(t=v.precision)+3;;)if(c=r,r=c.plus(f(h,c,l+2,1)).times(.5),e(c.d).slice(0,l)===(n=e(r.d)).slice(0,l)){if(n=n.slice(l-3,l+1),"9999"!=n&&(y||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(i(r,t+1,1),p=!r.times(r).eq(h));break}if(!y&&(i(c,t+1,0),c.times(c).eq(h))){r=c;break}l+=4;y=1}return u=!0,i(r,t,v.rounding,p)};t.tangent=t.tan=function(){var r,u,n=this,t=n.constructor;return n.isFinite()?n.isZero()?new t(n):(r=t.precision,u=t.rounding,t.precision=r+10,t.rounding=1,n=n.sin(),n.s=1,n=f(n,new t(1).minus(n.times(n)).sqrt(),r+10,0),t.precision=r,t.rounding=u,i(2==y||4==y?n.neg():n,r,u,!0)):new t(NaN)};t.times=t.mul=function(n){var v,b,f,h,t,y,k,c,l,p=this,w=p.constructor,e=p.d,s=(n=new w(n)).d;if(n.s*=p.s,!(e&&e[0]&&s&&s[0]))return new w(!n.s||e&&!e[0]&&!s||s&&!s[0]&&!e?NaN:e&&s?0*n.s:n.s/0);for(b=o(p.e/r)+o(n.e/r),c=e.length,l=s.length,l>c&&(t=e,e=s,s=t,y=c,c=l,l=y),t=[],y=c+l,f=y;f--;)t.push(0);for(f=l;--f>=0;){for(v=0,h=c+f;h>f;)k=t[h]+s[f]*e[h-f-1]+v,t[h--]=k%a|0,v=k/a|0;t[h]=(t[h]+v)%a|0}for(;!t[--y];)t.pop();for(v?++b:t.shift(),f=t.length;!t[--f];)t.pop();return n.d=t,n.e=it(t,b),u?i(n,w.precision,w.rounding):n};t.toBinary=function(n,t){return st(this,2,n,t)};t.toDecimalPlaces=t.toDP=function(n,t){var r=this,u=r.constructor;return r=new u(r),void 0===n?r:(h(n,0,b),void 0===t?t=u.rounding:h(t,0,8),i(r,n+r.e+1,t))};t.toExponential=function(n,t){var u,r=this,f=r.constructor;return void 0===n?u=v(r,!0):(h(n,0,b),void 0===t?t=f.rounding:h(t,0,8),r=i(new f(r),n+1,t),u=v(r,!0,n+1)),r.isNeg()&&!r.isZero()?"-"+u:u};t.toFixed=function(n,t){var u,f,r=this,e=r.constructor;return void 0===n?u=v(r):(h(n,0,b),void 0===t?t=e.rounding:h(t,0,8),f=i(new e(r),n+r.e+1,t),u=v(f,!1,n+f.e+1)),r.isNeg()&&!r.isZero()?"-"+u:u};t.toFraction=function(n){var h,a,c,t,y,w,i,v,o,g,b,nt,p=this,d=p.d,l=p.constructor;if(!d)return new l(p);if(o=a=new l(1),c=v=new l(0),h=new l(c),y=h.e=lt(d)-p.e-1,w=y%r,h.d[0]=s(10,0>w?r+w:w),null==n)n=y>0?h:o;else{if(i=new l(n),!i.isInt()||i.lt(o))throw Error(k+i);n=i.gt(h)?y>0?h:o:i}for(u=!1,i=new l(e(d)),g=l.precision,l.precision=y=d.length*r*2;b=f(i,h,0,1,1),t=a.plus(b.times(c)),1!=t.cmp(n);)a=c,c=t,t=o,o=v.plus(b.times(t)),v=t,t=h,h=i.minus(b.times(t)),i=t;return t=f(n.minus(a),c,0,1,1),v=v.plus(t.times(o)),a=a.plus(t.times(c)),v.s=o.s=p.s,nt=f(o,c,y,1).minus(p).abs().cmp(f(v,a,y,1).minus(p).abs())<1?[o,c]:[v,a],l.precision=g,u=!0,nt};t.toHexadecimal=t.toHex=function(n,t){return st(this,16,n,t)};t.toNearest=function(n,t){var r=this,e=r.constructor;if(r=new e(r),null==n){if(!r.d)return r;n=new e(1);t=e.rounding}else{if(n=new e(n),void 0!==t&&h(t,0,8),!r.d)return n.s?r:n;if(!n.d)return n.s&&(n.s=r.s),n}return n.d[0]?(u=!1,4>t&&(t=[4,5,7,8][t]),r=f(r,n,0,t,1).times(n),u=!0,i(r)):(n.s=r.s,r=n),r};t.toNumber=function(){return+this};t.toOctal=function(n,t){return st(this,8,n,t)};t.toPower=t.pow=function(n){var l,a,h,c,v,y,b,t=this,f=t.constructor,p=+(n=new f(n));if(!(t.d&&n.d&&t.d[0]&&n.d[0]))return new f(s(+t,p));if(t=new f(t),t.eq(1))return t;if(h=f.precision,v=f.rounding,n.eq(1))return i(t,h,v);if(l=o(n.e/r),a=n.d.length-1,b=l>=a,y=t.s,b){if((a=0>p?-p:p)<=fu)return c=at(f,t,a,h),n.s<0?new f(1).div(c):i(c,h,v)}else if(0>y)return new f(NaN);return y=0>y&&1&n.d[Math.max(l,a)]?-1:1,a=s(+t,p),l=0!=a&&isFinite(a)?new f(a+"").e:o(p*(Math.log("0."+e(t.d))/Math.LN10+t.e+1)),l>f.maxE+1||l0?y/0:0):(u=!1,f.rounding=t.s=1,a=Math.min(12,(l+"").length),c=ot(n.times(w(t,h+a)),h),c=i(c,h+5,1),nt(c.d,h,v)&&(l=h+10,c=i(ot(n.times(w(t,l+a)),l),l+5,1),+e(c.d).slice(h+1,h+15)+1==1e14&&(c=i(c,h+1,0))),c.s=y,u=!0,f.rounding=v,i(c,h,v))};t.toPrecision=function(n,t){var f,r=this,u=r.constructor;return void 0===n?f=v(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(h(n,1,b),void 0===t?t=u.rounding:h(t,0,8),r=i(new u(r),n,t),f=v(r,n<=r.e||r.e<=u.toExpNeg,n)),r.isNeg()&&!r.isZero()?"-"+f:f};t.toSignificantDigits=t.toSD=function(n,t){var u=this,r=u.constructor;return void 0===n?(n=r.precision,t=r.rounding):(h(n,1,b),void 0===t?t=r.rounding:h(t,0,8)),i(new r(u),n,t)};t.toString=function(){var n=this,t=n.constructor,i=v(n,n.e<=t.toExpNeg||n.e>=t.toExpPos);return n.isNeg()&&!n.isZero()?"-"+i:i};t.truncated=t.trunc=function(){return i(new this.constructor(this),this.e+1,1)};t.valueOf=t.toJSON=function(){var n=this,t=n.constructor,i=v(n,n.e<=t.toExpNeg||n.e>=t.toExpPos);return n.isNeg()?"-"+i:i};f=function(){function n(n,t,i){var u,r=0,f=n.length;for(n=n.slice();f--;)u=n[f]*t+r,n[f]=u%i|0,r=u/i|0;return r&&n.unshift(r),n}function t(n,t,i,r){var u,f;if(i!=r)f=i>r?1:-1;else for(u=f=0;i>u;u++)if(n[u]!=t[u]){f=n[u]>t[u]?1:-1;break}return f}function u(n,t,i,r){for(var u=0;i--;)n[i]-=u,u=n[i]1;)n.shift()}return function(f,e,s,h,c,l){var g,et,w,y,it,ot,nt,ft,rt,ut,p,b,ht,tt,vt,ct,st,yt,d,lt,at=f.constructor,pt=f.s==e.s?1:-1,k=f.d,v=e.d;if(!(k&&k[0]&&v&&v[0]))return new at(f.s&&e.s&&(k?!v||k[0]!=v[0]:v)?k&&0==k[0]||!v?0*pt:pt/0:NaN);for(l?(it=1,et=f.e-e.e):(l=a,it=r,et=o(f.e/it)-o(e.e/it)),d=v.length,st=k.length,rt=new at(pt),ut=rt.d=[],w=0;v[w]==(k[w]||0);w++);if(v[w]>(k[w]||0)&&et--,null==s?(tt=s=at.precision,h=at.rounding):tt=c?s+(f.e-e.e)+1:s,0>tt)ut.push(1),ot=!0;else{if(tt=tt/it+2|0,w=0,1==d){for(y=0,v=v[0],tt++;(st>w||y)&&tt--;w++)vt=y*l+(k[w]||0),ut[w]=vt/v|0,y=vt%v|0;ot=y||st>w}else{for(y=l/(v[0]+1)|0,y>1&&(v=n(v,y,l),k=n(k,y,l),d=v.length,st=k.length),ct=d,p=k.slice(0,d),b=p.length;d>b;)p[b++]=0;lt=v.slice();lt.unshift(0);yt=v[0];v[1]>=l/2&&++yt;do y=0,g=t(v,p,d,b),0>g?(ht=p[0],d!=b&&(ht=ht*l+(p[1]||0)),y=ht/yt|0,y>1?(y>=l&&(y=l-1),nt=n(v,y,l),ft=nt.length,b=p.length,g=t(nt,p,ft,b),1==g&&(y--,u(nt,ft>d?lt:v,ft,l))):(0==y&&(g=y=1),nt=v.slice()),ft=nt.length,b>ft&&nt.unshift(0),u(p,nt,b,l),-1==g&&(b=p.length,g=t(v,p,d,b),1>g&&(y++,u(p,b>d?lt:v,b,l))),b=p.length):0===g&&(y++,p=[0]),ut[w++]=y,g&&p[0]?p[b++]=k[ct]||0:(p=[k[ct]],b=1);while((ct++=10;y/=10)w++;rt.e=w+et*it-1;i(rt,c?s+rt.e+1:s,h,ot)}return rt}}();c=dt(c);ut=new c(ut);ft=new c(ft);Bridge.$Decimal=c;"function"==typeof define&&define.amd?define(function(){return c}):"undefined"!=typeof module&&module.exports?module.exports=c["default"]=c.Decimal=c:(n||(n="undefined"!=typeof self&&self&&self.self==self?self:Function("return this")()),ni=n.Decimal,c.noConflict=function(){return n.Decimal=ni,c})}(Bridge.global);System.Decimal=function(n,t,i){var r;if(this.constructor!==System.Decimal)return new System.Decimal(n,t,i);if(n==null&&(n=0),typeof n=="string"){if(t=t||System.Globalization.CultureInfo.getCurrentCulture(),r=t&&t.getFormat(System.Globalization.NumberFormatInfo),r&&r.numberDecimalSeparator!=="."&&(n=n.replace(r.numberDecimalSeparator,".")),!/^\s*[+-]?(\d+|\d+.|\d*\.\d+)((e|E)[+-]?\d+)?\s*$/.test(n))throw new System.FormatException;n=n.replace(/\s/g,"")}if(i&&i.precision&&typeof n=="number"){var f=Bridge.Int.trunc(n),e=(f+"").length,u=i.precision-e;u<0&&(u=0);n=n.toFixed(u)}this.value=System.Decimal.getValue(n)};System.Decimal.$$name="System.Decimal";System.Decimal.prototype.$$name="System.Decimal";System.Decimal.$kind="struct";System.Decimal.prototype.$kind="struct";System.Decimal.$$inherits=[];Bridge.Class.addExtend(System.Decimal,[System.IComparable,System.IFormattable,System.IComparable$1(System.Decimal),System.IEquatable$1(System.Decimal)]);System.Decimal.$is=function(n){return n instanceof System.Decimal};System.Decimal.getDefaultValue=function(){return new System.Decimal(0)};System.Decimal.getValue=function(n){return Bridge.hasValue(n)?n instanceof System.Decimal?n.value:n instanceof System.Int64||n instanceof System.UInt64?new Bridge.$Decimal(n.toString()):new Bridge.$Decimal(n):this.getDefaultValue()};System.Decimal.create=function(n){return Bridge.hasValue(n)?n instanceof System.Decimal?n:new System.Decimal(n):null};System.Decimal.lift=function(n){return n==null?null:System.Decimal.create(n)};System.Decimal.prototype.toString=function(n,t){return!n&&!t?this.value.toString():Bridge.Int.format(this,n,t)};System.Decimal.prototype.toFloat=function(){return this.value.toNumber()};System.Decimal.prototype.toJSON=function(){return this.value.toNumber()};System.Decimal.prototype.format=function(n,t){return Bridge.Int.format(this,n,t)};System.Decimal.prototype.decimalPlaces=function(){return this.value.decimalPlaces()};System.Decimal.prototype.dividedToIntegerBy=function(n){return new System.Decimal(this.value.dividedToIntegerBy(System.Decimal.getValue(n)))};System.Decimal.prototype.exponential=function(){return new System.Decimal(this.value.exponential())};System.Decimal.prototype.abs=function(){return new System.Decimal(this.value.abs())};System.Decimal.prototype.floor=function(){return new System.Decimal(this.value.floor())};System.Decimal.prototype.ceil=function(){return new System.Decimal(this.value.ceil())};System.Decimal.prototype.trunc=function(){return new System.Decimal(this.value.trunc())};System.Decimal.round=function(n,t){var i,r;return n=System.Decimal.create(n),i=Bridge.$Decimal.rounding,Bridge.$Decimal.rounding=t,r=new System.Decimal(n.value.round()),Bridge.$Decimal.rounding=i,r};System.Decimal.toDecimalPlaces=function(n,t,i){n=System.Decimal.create(n);return new System.Decimal(n.value.toDecimalPlaces(t,i))};System.Decimal.prototype.compareTo=function(n){return this.value.comparedTo(System.Decimal.getValue(n))};System.Decimal.prototype.add=function(n){return new System.Decimal(this.value.plus(System.Decimal.getValue(n)))};System.Decimal.prototype.sub=function(n){return new System.Decimal(this.value.minus(System.Decimal.getValue(n)))};System.Decimal.prototype.isZero=function(){return this.value.isZero};System.Decimal.prototype.mul=function(n){return new System.Decimal(this.value.times(System.Decimal.getValue(n)))};System.Decimal.prototype.div=function(n){return new System.Decimal(this.value.dividedBy(System.Decimal.getValue(n)))};System.Decimal.prototype.mod=function(n){return new System.Decimal(this.value.modulo(System.Decimal.getValue(n)))};System.Decimal.prototype.neg=function(){return new System.Decimal(this.value.negated())};System.Decimal.prototype.inc=function(){return new System.Decimal(this.value.plus(System.Decimal.getValue(1)))};System.Decimal.prototype.dec=function(){return new System.Decimal(this.value.minus(System.Decimal.getValue(1)))};System.Decimal.prototype.sign=function(){return this.value.isZero()?0:this.value.isNegative()?-1:1};System.Decimal.prototype.clone=function(){return new System.Decimal(this)};System.Decimal.prototype.ne=function(n){return!!this.compareTo(n)};System.Decimal.prototype.lt=function(n){return this.compareTo(n)<0};System.Decimal.prototype.lte=function(n){return this.compareTo(n)<=0};System.Decimal.prototype.gt=function(n){return this.compareTo(n)>0};System.Decimal.prototype.gte=function(n){return this.compareTo(n)>=0};System.Decimal.prototype.equals=function(n){return!this.compareTo(n)};System.Decimal.prototype.equalsT=function(n){return!this.compareTo(n)};System.Decimal.prototype.getHashCode=function(){for(var n=this.sign()*397+this.value.e|0,t=0;t0&&h>0){for(u=h%f||f,r=s.substr(0,u);u0&&(r+=a+s.slice(u));l&&(r="-"+r)}return c?r+i.decimalSeparator+((e=+i.fractionGroupSize)?c.replace(new RegExp("\\d{"+e+"}\\B","g"),"$&"+i.fractionGroupSeparator):c):r};System.Decimal.prototype.toFormat=function(n,t,i){var r={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0},f,u;return i&&!i.getFormat?(r=Bridge.merge(r,i),f=this._toFormat(n,t,r)):(i=i||System.Globalization.CultureInfo.getCurrentCulture(),u=i&&i.getFormat(System.Globalization.NumberFormatInfo),u&&(r.decimalSeparator=u.numberDecimalSeparator,r.groupSeparator=u.numberGroupSeparator,r.groupSize=u.numberGroupSizes[0]),f=this._toFormat(n,t,r)),f};Bridge.$Decimal.config({precision:29});System.Decimal.Zero=System.Decimal(0);System.Decimal.One=System.Decimal(1);System.Decimal.MinusOne=System.Decimal(-1);System.Decimal.MinValue=System.Decimal("-79228162514264337593543950335");System.Decimal.MaxValue=System.Decimal("79228162514264337593543950335");System.Decimal.precision=29;Bridge.define("System.DayOfWeek",{$kind:"enum",$statics:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6}});pt={getDefaultValue:function(){return new Date(-864e13)},utcNow:function(){var n=new Date;return new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())},today:function(){var n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate())},timeOfDay:function(n){return new System.TimeSpan((n-new Date(n.getFullYear(),n.getMonth(),n.getDate()))*1e4)},isUseGenitiveForm:function(n,t,i,r){for(var f=0,u=t-1;u>=0&&n[u]!==r;u--);if(u>=0){while(--u>=0&&n[u]===r)f++;if(f<=1)return!0}for(u=t+i;u=0?"-":"+")+Math.floor(Math.abs(p));break;case"zz":case"zzz":p=s/60;p=(p>=0?"-":"+")+System.String.alignString(Math.floor(Math.abs(p)).toString(),2,"0",2);n==="zzz"&&(p+=r.timeSeparator+System.String.alignString(Math.floor(Math.abs(s%60)).toString(),2,"0",2));break;case":":p=r.timeSeparator;break;case"/":p=r.dateSeparator;break;default:p=n.substr(1,n.length-1-(n.charAt(0)!=="\\"))}return p})},parse:function(n,t,i,r){var u=this.parseExact(n,null,t,i,!0);if(u!==null)return u;if(u=Date.parse(n),isNaN(u)){if(!r)throw new System.FormatException("String does not contain a valid string representation of a date and time.");}else return new Date(u)},parseExact:function(n,t,i,r,u){var ft,ct;if(t||(t=["G","g","F","f","D","d","R","r","s","S","U","u","O","o","Y","y","M","m","T","t"]),Bridge.isArray(t)){for(ft=0,ft;ft30?1900:2e3)+c)}else if(f==="MMM"||f==="MMMM"){for(l=0,ut=f==="MMM"?this.isUseGenitiveForm(t,k,3,"d")?y.abbreviatedMonthGenitiveNames:y.abbreviatedMonthNames:this.isUseGenitiveForm(t,k,4,"d")?y.monthGenitiveNames:y.monthNames,b=0;b12){o=!0;break}}else if(f==="MM"||f==="M"){if(l=this.subparseInt(n,e,f.length,2),l==null||l<1||l>12){o=!0;break}e+=l.length}else if(f==="dddd"||f==="ddd"){for(ut=f==="ddd"?y.abbreviatedDayNames:y.dayNames,b=0;b31){o=!0;break}e+=w.length}else if(f==="hh"||f==="h"){if(h=this.subparseInt(n,e,f.length,2),h==null||h<1||h>12){o=!0;break}e+=h.length}else if(f==="HH"||f==="H"){if(h=this.subparseInt(n,e,f.length,2),h==null||h<0||h>23){o=!0;break}e+=h.length}else if(f==="mm"||f==="m"){if(d=this.subparseInt(n,e,f.length,2),d==null||d<0||d>59)return null;e+=d.length}else if(f==="ss"||f==="s"){if(g=this.subparseInt(n,e,f.length,2),g==null||g<0||g>59){o=!0;break}e+=g.length}else if(f==="u"){if(v=this.subparseInt(n,e,1,7),v==null){o=!0;break}e+=v.length;v.length>3&&(v=v.substring(0,3))}else if(f==="fffffff"||f==="ffffff"||f==="fffff"||f==="ffff"||f==="fff"||f==="ff"||f==="f"){if(v=this.subparseInt(n,e,f.length,7),v==null){o=!0;break}e+=v.length;v.length>3&&(v=v.substring(0,3))}else if(f==="t"){if(n.substring(e,e+1).toLowerCase()===et.charAt(0).toLowerCase())nt=et;else if(n.substring(e,e+1).toLowerCase()===ot.charAt(0).toLowerCase())nt=ot;else{o=!0;break}e+=1}else if(f==="tt"){if(n.substring(e,e+2).toLowerCase()===et.toLowerCase())nt=et;else if(n.substring(e,e+2).toLowerCase()===ot.toLowerCase())nt=ot;else{o=!0;break}e+=2}else if(f==="z"||f==="zz"){if(it=n.charAt(e),it==="-")rt=!0;else if(it==="+")rt=!1;else{o=!0;break}if(e++,a=this.subparseInt(n,e,1,2),a==null||a>14){o=!0;break}e+=a.length;rt&&(a=-a)}else if(f==="zzz"){if(s=n.substring(e,e+6),e+=6,s.length!==6){o=!0;break}if(it=s.charAt(0),it==="-")rt=!0;else if(it==="+")rt=!1;else{o=!0;break}if(tt=1,a=this.subparseInt(s,tt,1,2),a==null||a>14){o=!0;break}if(tt+=a.length,rt&&(a=-a),s.charAt(tt)!==y.timeSeparator){o=!0;break}if(tt++,ht=this.subparseInt(s,tt,1,2),ht==null||a>59){o=!0;break}}else lt=!1;if(p||!lt){if(s=n.substring(e,e+f.length),!p&&(f===":"&&s!==y.timeSeparator||f==="/"&&s!==y.dateSeparator)||s!==f&&f!=="'"&&f!=='"'&&f!=="\\"){o=!0;break}if(p==="\\"&&(p=!1),f!=="'"&&f!=='"'&&f!=="\\")e+=f.length;else if(p===!1)p=f;else{if(p!==f){o=!0;break}p=!1}}}if(p&&(o=!0),o||(e!==n.length?o=!0:l===2?c%4==0&&c%100!=0||c%400==0?w>29&&(o=!0):w>28&&(o=!0):(l===4||l===6||l===9||l===11)&&w>30&&(o=!0)),o){if(u)return null;throw new System.FormatException("String does not contain a valid string representation of a date and time.");}return(h<12&&nt===ot?h=+h+12:h>11&&nt===et&&(h-=12),a===0&&ht===0&&!r)?new Date(c,l-1,w,h,d,g,v):new Date(Date.UTC(c,l-1,w,h-a,d-ht,g,v))},subparseInt:function(n,t,i,r){for(var f,u=r;u>=i;u--){if(f=n.substring(t,t+u),f.lengtht:!1},gte:function(n,t){return Bridge.hasValue$1(n,t)?n>=t:!1},lt:function(n,t){return Bridge.hasValue$1(n,t)?n12?this.getHours()-12:this.getHours()===0?12:this.getHours()},add:function(n){return new System.TimeSpan(this.ticks.add(n.ticks))},subtract:function(n){return new System.TimeSpan(this.ticks.sub(n.ticks))},duration:function(){return new System.TimeSpan(this.ticks.abs())},negate:function(){return new System.TimeSpan(this.ticks.neg())},compareTo:function(n){return this.ticks.compareTo(n.ticks)},equals:function(n){return n.ticks.eq(this.ticks)},equalsT:function(n){return n.ticks.eq(this.ticks)},format:function(n,t){return this.toString(n,t)},getHashCode:function(){return this.ticks.getHashCode()},toString:function(n,t){var i=this.ticks,f="",r=this,e=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo),u=function(n,t,i,r){return System.String.alignString((n|0).toString(),t||2,"0",i||2,r||!1)};return n?n.replace(/(\\.|'[^']*'|"[^"]*"|dd?|HH?|hh?|mm?|ss?|tt?|f{1,7}|\:|\/)/g,function(n){var t=n;switch(n){case"d":return r.getDays();case"dd":return u(r.getDays());case"H":return r.getHours();case"HH":return u(r.getHours());case"h":return r.get12HourHour();case"hh":return u(r.get12HourHour());case"m":return r.getMinutes();case"mm":return u(r.getMinutes());case"s":return r.getSeconds();case"ss":return u(r.getSeconds());case"t":return(r.getHours()<12?e.amDesignator:e.pmDesignator).substring(0,1);case"tt":return r.getHours()<12?e.amDesignator:e.pmDesignator;case"f":case"ff":case"fff":case"ffff":case"fffff":case"ffffff":case"fffffff":return u(r.getMilliseconds(),n.length,1,!0);default:return n.substr(1,n.length-1-(n.charAt(0)!=="\\"))}}):(i.abs().gte(864e9)&&(f+=u(i.toNumberDivided(864e9))+".",i=i.mod(864e9)),f+=u(i.toNumberDivided(36e9))+":",i=i.mod(36e9),f+=u(i.toNumberDivided(6e8)|0)+":",i=i.mod(6e8),f+=u(i.toNumberDivided(1e7)),i=i.mod(1e7),i.gt(0)&&(f+="."+u(i.toNumber(),7)),f)}});Bridge.Class.addExtend(System.TimeSpan,[System.IComparable$1(System.TimeSpan),System.IEquatable$1(System.TimeSpan)]);Bridge.define("System.Text.StringBuilder",{ctor:function(){this.$initialize();this.buffer=[];this.capacity=16;arguments.length===1?this.append(arguments[0]):arguments.length===2?(this.append(arguments[0]),this.setCapacity(arguments[1])):arguments.length===3&&this.append(arguments[0],arguments[1],arguments[2])},getLength:function(){if(this.buffer.length<2)return this.buffer[0]?this.buffer[0].length:0;var n=this.buffer.join("");return this.buffer=[],this.buffer[0]=n,n.length},getCapacity:function(){var n=this.getLength();return this.capacity>n?this.capacity:n},setCapacity:function(n){var t=this.getLength();n>t&&(this.capacity=n)},toString:function(){var n=this.buffer.join(""),t,i;return(this.buffer=[],this.buffer[0]=n,arguments.length===2)?(t=arguments[0],i=arguments[1],this.checkLimits(n,t,i),n.substr(t,i)):n},append:function(n){var i,t;if(n==null)return this;if(arguments.length===2){if(t=arguments[1],t===0)return this;if(t<0)throw new System.ArgumentOutOfRangeException("count","cannot be less than zero");n=Array(t+1).join(n).toString()}else if(arguments.length===3){if(i=arguments[1],t=arguments[2],t===0)return this;this.checkLimits(n,i,t);n=n.substr(i,t)}return this.buffer[this.buffer.length]=n,this},appendFormat:function(){return this.append(System.String.format.apply(System.String,arguments))},clear:function(){return this.buffer=[],this},appendLine:function(){return arguments.length===1&&this.append(arguments[0]),this.append("\r\n")},equals:function(n){return n==null?!1:n===this?!0:this.toString()===n.toString()},remove:function(n,t){var i=this.buffer.join("");return(this.checkLimits(i,n,t),i.length===t&&n===0)?this.clear():(t>0&&(this.buffer=[],this.buffer[0]=i.substring(0,n),this.buffer[1]=i.substring(n+t,i.length)),this)},insert:function(n,t){var r,i;if(t==null)return this;if(arguments.length===3){if(r=arguments[2],r===0)return this;if(r<0)throw new System.ArgumentOutOfRangeException("count","cannot be less than zero");t=Array(r+1).join(t).toString()}return i=this.buffer.join(""),this.buffer=[],n<1?(this.buffer[0]=t,this.buffer[1]=i):n>=i.length?(this.buffer[0]=i,this.buffer[1]=t):(this.buffer[0]=i.substring(0,n),this.buffer[1]=t,this.buffer[2]=i.substring(n,i.length)),this},replace:function(n,t){var f=new RegExp(n,"g"),i=this.buffer.join("");if(this.buffer=[],arguments.length===4){var r=arguments[2],u=arguments[3],e=i.substr(r,u);this.checkLimits(i,r,u);this.buffer[0]=i.substring(0,r);this.buffer[1]=e.replace(f,t);this.buffer[2]=i.substring(r+u,i.length)}else this.buffer[0]=i.replace(f,t);return this},checkLimits:function(n,t,i){if(i<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");if(t<0)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero");if(i>n.length-t)throw new System.ArgumentOutOfRangeException("Index and length must refer to a location within the string");}}),function(){var n=RegExp("[-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]","g"),t=function(t){return t.replace(n,"\\$&")};Bridge.regexpEscape=t}();System.Diagnostics.Debug={writeln:function(n){Bridge.Console.debug(n)},_fail:function(n){System.Diagnostics.Debug.writeln(n)},assert:function(n,t){n||(t="Assert failed: "+t,confirm(t+"\r\n\r\nBreak into debugger?")&&System.Diagnostics.Debug._fail(t))},fail:function(n){System.Diagnostics.Debug._fail(n)}};Bridge.define("System.Diagnostics.Stopwatch",{ctor:function(){this.$initialize();this._stopTime=System.Int64.Zero;this._startTime=System.Int64.Zero;this.isRunning=!1},reset:function(){this._stopTime=this._startTime=System.Diagnostics.Stopwatch.getTimestamp();this.isRunning=!1},ticks:function(){return(this.isRunning?System.Diagnostics.Stopwatch.getTimestamp():this._stopTime).sub(this._startTime)},milliseconds:function(){return this.ticks().mul(1e3).div(System.Diagnostics.Stopwatch.frequency)},timeSpan:function(){return new System.TimeSpan(this.milliseconds().mul(1e4))},start:function(){this.isRunning||(this._startTime=System.Diagnostics.Stopwatch.getTimestamp(),this.isRunning=!0)},stop:function(){this.isRunning&&(this._stopTime=System.Diagnostics.Stopwatch.getTimestamp(),this.isRunning=!1)},restart:function(){this.isRunning=!1;this.start()},statics:{startNew:function(){var n=new System.Diagnostics.Stopwatch;return n.start(),n}}});typeof window!="undefined"&&window.performance&&window.performance.now?(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e6),System.Diagnostics.Stopwatch.isHighResolution=!0,System.Diagnostics.Stopwatch.getTimestamp=function(){return new System.Int64(Math.round(window.performance.now()*1e3))}):typeof process!="undefined"&&process.hrtime?(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e9),System.Diagnostics.Stopwatch.isHighResolution=!0,System.Diagnostics.Stopwatch.getTimestamp=function(){var n=process.hrtime();return new System.Int64(n[0]).mul(1e9).add(n[1])}):(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e3),System.Diagnostics.Stopwatch.isHighResolution=!1,System.Diagnostics.Stopwatch.getTimestamp=function(){return new System.Int64((new Date).valueOf())});System.Diagnostics.Contracts.Contract={reportFailure:function(n,t,i,r,u){var f=i.toString(),e,o;if(f=f.substring(f.indexOf("return")+7),f=f.substr(0,f.lastIndexOf(";")),e=f?"Contract '"+f+"' failed":"Contract failed",o=t?e+": "+t:e,u)throw new u(f,t);else throw new System.Diagnostics.Contracts.ContractException(n,o,t,f,r);},assert:function(n,t,i){t()||System.Diagnostics.Contracts.Contract.reportFailure(n,i,t,null)},requires:function(n,t,i){t()||System.Diagnostics.Contracts.Contract.reportFailure(0,i,t,null,n)},forAll:function(n,t,i){if(!i)throw new System.ArgumentNullException("predicate");for(;n=(n.$s?n.$s[0]:n.length))throw new System.ArgumentException("Index 0 out of range");var r=t[0],i;if(n.$s)for(i=1;i=n.$s[i])throw new System.ArgumentException("Index "+i+" out of range");r=r*n.$s[i]+t[i]}return r},$get:function(n){var t=this[System.Array.toIndex(this,n)];return typeof t!="undefined"?t:this.$v},get:function(n){var t,i,r;if(arguments.length<2)throw new System.ArgumentNullException("indices");for(t=Array.prototype.slice.call(arguments,1),i=0;i=(n.$s?n.$s.length:1))throw new System.IndexOutOfRangeException;return n.$s?n.$s[t]:n.length},getRank:function(n){return n.$s?n.$s.length:1},getLower:function(n,t){return System.Array.getLength(n,t),0},create:function(n,t,i,r){if(r===null)throw new System.ArgumentNullException("length");var u=[],a=arguments.length>3?1:0,f,s,h,e,o,c,l;if(u.$v=n,u.$s=[],u.get=System.Array.$get,u.set=System.Array.$set,r&&Bridge.isArray(r))for(f=0;f=0;s--)o=l%u.$s[s],c.unshift(o),l=Bridge.Int.div(l-o,u.$s[s]);for(h=t,o=0;on.length)throw new System.IndexOutOfRangeException;for(var u=Bridge.isFunction(t);--r>=0;)n[i+r]=u?t():t},copy:function(n,t,i,r,u){if(!i)throw new System.ArgumentNullException("dest","Value cannot be null");if(!n)throw new System.ArgumentNullException("src","Value cannot be null");if(t<0||r<0||u<0)throw new System.ArgumentOutOfRangeException("Number was less than the array's lower bound in the first dimension");if(u>n.length-t||u>i.length-r)throw new System.ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds");if(t=0)i[r+u]=n[t+u];else for(var f=0;f-1:i&&Bridge.isFunction(n[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$contains"])||Bridge.isFunction(n[r="System$Collections$IList$contains"])?n[r](t):Bridge.isFunction(n.contains)?n.contains(t):!1},remove:function(n,t,i){var r,u;if(Bridge.isArray(n)){if(u=System.Array.indexOf(n,t),u>-1)return n.splice(u,1),!0}else{if(i&&Bridge.isFunction(n[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$remove"])||Bridge.isFunction(n[r="System$Collections$IList$remove"]))return n[r](t);if(Bridge.isFunction(n.remove))return n.remove(t)}return!1},insert:function(n,t,i,r){var u;Bridge.isArray(n)?n.splice(t,0,i):r&&Bridge.isFunction(n[u="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(r)+"$insert"])?n[u](t,i):Bridge.isFunction(n[u="System$Collections$IList$insert"])?n[u](t,i):Bridge.isFunction(n.insert)&&n.insert(t,i)},removeAt:function(n,t,i){var r;Bridge.isArray(n)?n.splice(t,1):i&&Bridge.isFunction(n[r="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(i)+"$removeAt"])?n[r](t):Bridge.isFunction(n[r="System$Collections$IList$removeAt"])?n[r](t):Bridge.isFunction(n.removeAt)&&n.removeAt(t)},getItem:function(n,t,i){var r;return Bridge.isArray(n)?n[t]:Bridge.isFunction(n.get)?n.get(t):Bridge.isFunction(n.getItem)?n.getItem(t):i&&Bridge.isFunction(n[r="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(i)+"$getItem"])||Bridge.isFunction(n[r="System$Collections$IList$$getItem"])?n[r](t):Bridge.isFunction(n.get_Item)?n.get_Item(t):void 0},setItem:function(n,t,i,r){var u;if(Bridge.isArray(n))n[t]=i;else if(Bridge.isFunction(n.set))n.set(t,i);else if(Bridge.isFunction(n.setItem))n.setItem(t,i);else{if(r&&Bridge.isFunction(n[u="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(r)+"$setItem"])||r&&Bridge.isFunction(n[u="System$Collections$IList$setItem"]))return n[u](t,i);Bridge.isFunction(n.set_Item)&&n.set_Item(t,i)}},resize:function(n,t,i){var u;if(t<0)throw new System.ArgumentOutOfRangeException("newSize",null,null,t);var f=0,e=Bridge.isFunction(i),r=n.v;for(r?(f=r.length,r.length=t):r=new Array(t),u=f;u>1);try{h=u.compare(n[e],r)}catch(c){throw new System.InvalidOperationException("Failed to compare two elements in the array.",c);}if(h===0)return e;h<0?f=e+1:s=e-1}return~f},sort:function(n,t,i,r){var f,u;if(!n)throw new System.ArgumentNullException("array");if(arguments.length===2&&typeof t=="object"&&(r=t,t=null),Bridge.isNumber(t)||(t=0),Bridge.isNumber(i)||(i=n.length),r||(r=System.Collections.Generic.Comparer$1.$default),t===0&&i===n.length)n.sort(Bridge.fn.bind(r,r.compare));else for(f=n.slice(t,t+i),f.sort(Bridge.fn.bind(r,r.compare)),u=t;ur||r>t)||n[i]>t||(r=n[i]);return r},addRange:function(n,t){if(Bridge.isArray(t))n.push.apply(n,t);else{var i=Bridge.getEnumerator(t);try{while(i.moveNext())n.push(i.getCurrent())}finally{Bridge.is(i,System.IDisposable)&&i.dispose()}}},convertAll:function(n,t){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException("converter");return n.map(t)},find:function(n,t,i){if(!Bridge.hasValue(t))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(i))throw new System.ArgumentNullException("match");for(var r=0;rn.length)throw new System.ArgumentOutOfRangeException("startIndex");if(i<0||t>n.length-i)throw new System.ArgumentOutOfRangeException("count");if(!Bridge.hasValue(r))throw new System.ArgumentNullException("match");for(f=t+i,u=t;u=0;r--)if(i(t[r]))return t[r];return Bridge.getDefaultValue(n)},findLastIndex:function(n,t,i,r){var f,u;if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(arguments.length===2?(r=t,t=n.length-1,i=n.length):arguments.length===3&&(r=i,i=t+1),!Bridge.hasValue(r))throw new System.ArgumentNullException("match");if(n.length===0){if(t!==-1)throw new System.ArgumentOutOfRangeException("startIndex");}else if(t<0||t>=n.length)throw new System.ArgumentOutOfRangeException("startIndex");if(i<0||t-i+1<0)throw new System.ArgumentOutOfRangeException("count");for(f=t-i,u=t;u>f;u--)if(r(n[u]))return u;return-1},forEach:function(n,t){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException("action");for(var i=0;i=n.length&&n.length>0)throw new System.ArgumentOutOfRangeException("startIndex","out of range");if(r<0||r>n.length-i)throw new System.ArgumentOutOfRangeException("count","out of range");return System.Array.indexOf(n,t,i,r)},lastIndexOfT:function(n,t,i,r){var e,u,f;if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(arguments.length===2?(i=n.length-1,r=n.length):arguments.length===3&&(r=n.length===0?0:i+1),i<0||i>=n.length&&n.length>0)throw new System.ArgumentOutOfRangeException("startIndex","out of range");if(r<0||i-r+1<0)throw new System.ArgumentOutOfRangeException("count","out of range");for(e=i-r+1,u=i;u>=e;u--)if(f=n[u],f===t||System.Collections.Generic.EqualityComparer$1.$default.equals2(f,t))return u;return-1},trueForAll:function(n,t){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException("match");for(var i=0;i=this.entries[r[t]].length-1)&&(i=-1,t++),t>=r.length)?!1:(i++,!0)},function(){return n(this.entries[r[t]][i])},function(){t=-1},null,this)},getEnumerator:function(){return this.getCustomEnumerator(function(n){return n})}}});Bridge.define("System.Collections.Generic.DictionaryCollection$1",function(n){return{inherits:[System.Collections.Generic.ICollection$1(n)],config:{alias:["getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(n)+"$getEnumerator","getCount","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$getCount","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$contains","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$remove"]},ctor:function(n,t){this.$initialize();this.dictionary=n;this.keys=t},getCount:function(){return this.dictionary.getCount()},getEnumerator:function(){return this.dictionary.getCustomEnumerator(this.keys?function(n){return n.key}:function(n){return n.value})},contains:function(n){return this.keys?this.dictionary.containsKey(n):this.dictionary.containsValue(n)},add:function(){throw new System.NotSupportedException;},clear:function(){throw new System.NotSupportedException;},remove:function(){throw new System.NotSupportedException;}}});Bridge.define("System.Collections.Generic.List$1",function(n){return{inherits:[System.Collections.Generic.IList$1(n),System.Collections.IList],config:{alias:["getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$getItem","getItem","System$Collections$IList$getItem","setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$setItem","setItem","System$Collections$IList$setItem","getCount","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$getCount","getCount","System$Collections$ICollection$getCount","getIsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$getIsReadOnly","getIsReadOnly","System$Collections$IList$getIsReadOnly","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$add","add","System$Collections$IList$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$clear","clear","System$Collections$IList$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$contains","contains","System$Collections$IList$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$copyTo","copyTo","System$Collections$ICollection$copyTo","getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(n)+"$getEnumerator","getEnumerator","System$Collections$IEnumerable$getEnumerator","indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$indexOf","indexOf","System$Collections$IList$indexOf","insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$insert","insert","System$Collections$IList$insert","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$remove","remove","System$Collections$IList$remove","removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$removeAt","removeAt","System$Collections$IList$removeAt"]},ctor:function(n){this.$initialize();this.items=Object.prototype.toString.call(n)==="[object Array]"?System.Array.clone(n):Bridge.is(n,System.Collections.IEnumerable)?Bridge.toArray(n):[];this.clear.$clearCallbacks=[]},checkIndex:function(n){if(n<0||n>this.items.length-1)throw new System.ArgumentOutOfRangeException("Index out of range");},getCount:function(){return this.items.length},getIsReadOnly:function(){return!!this.readOnly},get:function(n){return this.checkIndex(n),this.items[n]},getItem:function(n){return this.get(n)},set:function(n,t){this.checkReadOnly();this.checkIndex(n);this.items[n]=t},setItem:function(n,t){this.set(n,t)},add:function(n){this.checkReadOnly();this.items.push(n)},addRange:function(n){this.checkReadOnly();for(var i=Bridge.toArray(n),t=0,r=i.length;t-1},copyTo:function(n,t){System.Array.copy(this.items,0,n,t,this.items.length)},getEnumerator:function(){return new Bridge.ArrayEnumerator(this.items,n)},getRange:function(t,i){Bridge.isDefined(t)||(t=0);Bridge.isDefined(i)||(i=this.items.length);t!==0&&this.checkIndex(t);this.checkIndex(t+i-1);for(var u=[],f=t+i,r=t;r=0;i--)if(n===this.items[i])return i;return-1},remove:function(n){this.checkReadOnly();var t=this.indexOf(n);return t<0?!1:(this.checkIndex(t),this.items.splice(t,1),!0)},removeAt:function(n){this.checkReadOnly();this.checkIndex(n);this.items.splice(n,1)},removeRange:function(n,t){this.checkReadOnly();this.checkIndex(n);this.items.splice(n,t)},reverse:function(){this.checkReadOnly();this.items.reverse()},slice:function(n,t){this.checkReadOnly();var i=this.$$name.substr(this.$$name.lastIndexOf("$")+1);return new(System.Collections.Generic.List$1(Bridge.unroll(i)))(this.items.slice(n,t))},sort:function(n){this.checkReadOnly();this.items.sort(n||System.Collections.Generic.Comparer$1.$default.compare)},splice:function(n,t,i){this.checkReadOnly();this.items.splice(n,t,i)},unshift:function(){this.checkReadOnly();this.items.unshift()},toArray:function(){return Bridge.toArray(this)},checkReadOnly:function(){if(this.readOnly)throw new System.NotSupportedException;},binarySearch:function(n,t,i,r){return arguments.length===1&&(i=n,n=null),arguments.length===2&&(i=n,r=t,n=null,t=null),Bridge.isNumber(n)||(n=0),Bridge.isNumber(t)||(t=this.items.length),r||(r=System.Collections.Generic.Comparer$1.$default),System.Array.binarySearch(this.items,n,t,i,r)},convertAll:function(n,t){var r,i;if(!Bridge.hasValue(t))throw new System.ArgumentNullException("converter is null.");for(r=new(System.Collections.Generic.List$1(n))(this.items.length),i=0;i0?t.setException(u):e?t.setCanceled():t.setResult(r))})})(i);return t.task},whenAny:function(n){if(Bridge.is(n,System.Collections.IEnumerable)?n=Bridge.toArray(n):Bridge.isArray(n)||(n=Array.prototype.slice.call(arguments,0)),!n.length)throw new System.ArgumentException("At least one task is required");for(var t=new System.Threading.Tasks.TaskCompletionSource,i=0;i=0?n:arguments.length+n]}}(t):typeof t!="function"&&(t=function(){return Array.prototype.slice.call(arguments,0)}),n.then(function(){u.setResult(t?t.apply(null,arguments):Array.prototype.slice.call(arguments,0))},function(){u.setException(i?i.apply(null,arguments):new Bridge.PromiseException(Array.prototype.slice.call(arguments,0)))},r),u.task}},continueWith:function(n,t){var i=new System.Threading.Tasks.TaskCompletionSource,r=this,u=t?function(){i.setResult(n(r))}:function(){try{i.setResult(n(r))}catch(t){i.setException(System.Exception.create(t))}};return this.isCompleted()?setTimeout(u,0):this.callbacks.push(u),i.task},start:function(){if(this.status!==System.Threading.Tasks.TaskStatus.created)throw new System.InvalidOperationException("Task was already started.");var n=this;this.status=System.Threading.Tasks.TaskStatus.running;setTimeout(function(){try{var t=n.action(n.state);delete n.action;delete n.state;n.complete(t)}catch(i){n.fail(new System.AggregateException(null,[System.Exception.create(i)]))}},0)},runCallbacks:function(){var n=this;setTimeout(function(){for(var t=0;t0?this.exception.innerExceptions.get(0):null:this.exception;default:throw new System.InvalidOperationException("Task is not yet completed.");}},getResult:function(){return this._getResult(!1)},dispose:function(){},getAwaiter:function(){return this},getAwaitedResult:function(){return this._getResult(!0)}});Bridge.define("System.Threading.Tasks.TaskStatus",{$kind:"enum",$statics:{created:0,waitingForActivation:1,waitingToRun:2,running:3,waitingForChildrenToComplete:4,ranToCompletion:5,canceled:6,faulted:7}});Bridge.define("System.Threading.Tasks.TaskCompletionSource",{ctor:function(){this.$initialize();this.task=new System.Threading.Tasks.Task;this.task.status=System.Threading.Tasks.TaskStatus.running},setCanceled:function(){if(!this.task.cancel())throw new System.InvalidOperationException("Task was already completed.");},setResult:function(n){if(!this.task.complete(n))throw new System.InvalidOperationException("Task was already completed.");},setException:function(n){if(!this.trySetException(n))throw new System.InvalidOperationException("Task was already completed.");},trySetCanceled:function(){return this.task.cancel()},trySetResult:function(n){return this.task.complete(n)},trySetException:function(n){return Bridge.is(n,System.Exception)&&(n=[n]),this.task.fail(new System.AggregateException(null,n))}});Bridge.define("System.Threading.CancellationTokenSource",{inherits:[System.IDisposable],config:{alias:["dispose","System$IDisposable$dispose"]},ctor:function(n){this.$initialize();this.timeout=typeof n=="number"&&n>=0?setTimeout(Bridge.fn.bind(this,this.cancel),n,-1):null;this.isCancellationRequested=!1;this.token=new System.Threading.CancellationToken(this);this.handlers=[]},cancel:function(n){var i,r,t;if(!this.isCancellationRequested){for(this.isCancellationRequested=!0,i=[],r=this.handlers,this.clean(),t=0;t0&&n!==-1)throw new System.AggregateException(null,i);}},cancelAfter:function(n){this.isCancellationRequested||(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(Bridge.fn.bind(this,this.cancel),n,-1))},register:function(n,t){if(this.isCancellationRequested)return n(t),new System.Threading.CancellationTokenRegistration;var i={f:n,s:t};return this.handlers.push(i),new System.Threading.CancellationTokenRegistration(this,i)},deregister:function(n){var t=this.handlers.indexOf(n);t>=0&&this.handlers.splice(t,1)},dispose:function(){this.clean()},clean:function(){if(this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.handlers=[],this.links){for(var n=0;n19)return!1;r=/[^0-9 \-]+/;e=!0}if(!r.test(n))return!1;for(n=n.split(e?"-":/[- ]/).join(""),u=0,i=2-n.length%2;i<=n.length;i+=2)u+=parseInt(n.charAt(i-1));for(i=n.length%2+1;i0)},parse:function(n){if(n==null)throw new System.ArgumentNullException("input");var t={v:new System.Version.VersionResult};if(t.v.init("input",!0),!System.Version.tryParseVersion(n,t))throw t.v.getVersionParseException();return t.v.m_parsedVersion},tryParse:function(n,t){var i={v:new System.Version.VersionResult},r;return i.v.init("input",!1),r=System.Version.tryParseVersion(n,i),t.v=i.v.m_parsedVersion,r},tryParseVersion:function(n,t){var u={},f={},e={},o={},r,i;if(n==null)return t.v.setFailure(System.Version.ParseFailureKind.ArgumentNullException),!1;if(r=n.split(System.Version.separatorsArray),i=r.length,i<2||i>4)return t.v.setFailure(System.Version.ParseFailureKind.ArgumentException),!1;if(!System.Version.tryParseComponent(r[0],"version",t,u)||!System.Version.tryParseComponent(r[1],"version",t,f))return!1;if(i=i-2|0,i>0){if(!System.Version.tryParseComponent(r[2],"build",t,e))return!1;if(i=i-1|0,i>0)if(System.Version.tryParseComponent(r[3],"revision",t,o))t.v.m_parsedVersion=new System.Version.$ctor3(u.v,f.v,e.v,o.v);else return!1;else t.v.m_parsedVersion=new System.Version.$ctor2(u.v,f.v,e.v)}else t.v.m_parsedVersion=new System.Version.$ctor1(u.v,f.v);return!0},tryParseComponent:function(n,t,i,r){return System.Int32.tryParse(n,r)?r.v<0?(i.v.setFailure$1(System.Version.ParseFailureKind.ArgumentOutOfRangeException,t),!1):!0:(i.v.setFailure$1(System.Version.ParseFailureKind.FormatException,n),!1)},op_Equality:function(n,t){return Bridge.referenceEquals(n,null)?Bridge.referenceEquals(t,null):n.equalsT(t)},op_Inequality:function(n,t){return!System.Version.op_Equality(n,t)},op_LessThan:function(n,t){if(n==null)throw new System.ArgumentNullException("v1");return n.compareTo(t)<0},op_LessThanOrEqual:function(n,t){if(n==null)throw new System.ArgumentNullException("v1");return n.compareTo(t)<=0},op_GreaterThan:function(n,t){return System.Version.op_LessThan(t,n)},op_GreaterThanOrEqual:function(n,t){return System.Version.op_LessThanOrEqual(t,n)}},_Major:0,_Minor:0,_Build:-1,_Revision:-1,config:{alias:["clone","System$ICloneable$clone","compareTo","System$IComparable$1$System$Version$compareTo","equalsT","System$IEquatable$1$System$Version$equalsT"]},$ctor3:function(n,t,i,r){if(this.$initialize(),n<0)throw new System.ArgumentOutOfRangeException("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException("minor","Cannot be < 0");if(i<0)throw new System.ArgumentOutOfRangeException("build","Cannot be < 0");if(r<0)throw new System.ArgumentOutOfRangeException("revision","Cannot be < 0");this._Major=n;this._Minor=t;this._Build=i;this._Revision=r},$ctor2:function(n,t,i){if(this.$initialize(),n<0)throw new System.ArgumentOutOfRangeException("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException("minor","Cannot be < 0");if(i<0)throw new System.ArgumentOutOfRangeException("build","Cannot be < 0");this._Major=n;this._Minor=t;this._Build=i},$ctor1:function(n,t){if(this.$initialize(),n<0)throw new System.ArgumentOutOfRangeException("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException("minor","Cannot be < 0");this._Major=n;this._Minor=t},$ctor4:function(n){this.$initialize();var t=System.Version.parse(n);this._Major=t.getMajor();this._Minor=t.getMinor();this._Build=t.getBuild();this._Revision=t.getRevision()},ctor:function(){this.$initialize();this._Major=0;this._Minor=0},getMajor:function(){return this._Major},getMinor:function(){return this._Minor},getBuild:function(){return this._Build},getRevision:function(){return this._Revision},getMajorRevision:function(){return Bridge.Int.sxs(this._Revision>>16&65535)},getMinorRevision:function(){return Bridge.Int.sxs(this._Revision&65535)},clone:function(){var n=new System.Version.ctor;return n._Major=this._Major,n._Minor=this._Minor,n._Build=this._Build,n._Revision=this._Revision,n},compareTo$1:function(n){if(n==null)return 1;var t=Bridge.as(n,System.Version);if(System.Version.op_Equality(t,null))throw new System.ArgumentException("version should be of System.Version type");return this._Major!==t._Major?this._Major>t._Major?1:-1:this._Minor!==t._Minor?this._Minor>t._Minor?1:-1:this._Build!==t._Build?this._Build>t._Build?1:-1:this._Revision!==t._Revision?this._Revision>t._Revision?1:-1:0},compareTo:function(n){return System.Version.op_Equality(n,null)?1:this._Major!==n._Major?this._Major>n._Major?1:-1:this._Minor!==n._Minor?this._Minor>n._Minor?1:-1:this._Build!==n._Build?this._Build>n._Build?1:-1:this._Revision!==n._Revision?this._Revision>n._Revision?1:-1:0},equals:function(n){return this.equalsT(Bridge.as(n,System.Version))},equalsT:function(n){return System.Version.op_Equality(n,null)?!1:this._Major!==n._Major||this._Minor!==n._Minor||this._Build!==n._Build||this._Revision!==n._Revision?!1:!0},getHashCode:function(){var n=0;return n=n|(this._Major&15)<<28,n=n|(this._Minor&255)<<20,n=n|(this._Build&255)<<12,n|this._Revision&4095},toString:function(){return this._Build===-1?this.toString$1(2):this._Revision===-1?this.toString$1(3):this.toString$1(4)},toString$1:function(n){var t;switch(n){case 0:return"";case 1:return this._Major.toString();case 2:return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.toString();default:if(this._Build===-1)throw new System.ArgumentException("Build should be > 0 if fieldCount > 2","fieldCount");if(n===3)return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Build,t),t.toString();if(this._Revision===-1)throw new System.ArgumentException("Revision should be > 0 if fieldCount > 3","fieldCount");if(n===4)return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Build,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Revision,t),t.toString();throw new System.ArgumentException("Should be < 5","fieldCount");}}});Bridge.define("System.Version.ParseFailureKind",{$kind:"enum",statics:{ArgumentNullException:0,ArgumentException:1,ArgumentOutOfRangeException:2,FormatException:3}});Bridge.define("System.Version.VersionResult",{$kind:"struct",statics:{getDefaultValue:function(){return new System.Version.VersionResult}},m_parsedVersion:null,m_failure:0,m_exceptionArgument:null,m_argumentName:null,m_canThrow:!1,ctor:function(){this.$initialize()},init:function(n,t){this.m_canThrow=t;this.m_argumentName=n},setFailure:function(n){this.setFailure$1(n,"")},setFailure$1:function(n,t){if(this.m_failure=n,this.m_exceptionArgument=t,this.m_canThrow)throw this.getVersionParseException();},getVersionParseException:function(){switch(this.m_failure){case System.Version.ParseFailureKind.ArgumentNullException:return new System.ArgumentNullException(this.m_argumentName);case System.Version.ParseFailureKind.ArgumentException:return new System.ArgumentException("VersionString");case System.Version.ParseFailureKind.ArgumentOutOfRangeException:return new System.ArgumentOutOfRangeException(this.m_exceptionArgument,"Cannot be < 0");case System.Version.ParseFailureKind.FormatException:try{System.Int32.parse(this.m_exceptionArgument)}catch(n){n=System.Exception.create(n);var t;if(Bridge.is(n,System.FormatException)||Bridge.is(n,System.OverflowException))return t=n;throw n;}return new System.FormatException("InvalidString");default:return new System.ArgumentException("VersionString")}},getHashCode:function(){return Bridge.addHash([5139482776,this.m_parsedVersion,this.m_failure,this.m_exceptionArgument,this.m_argumentName,this.m_canThrow])},equals:function(n){return Bridge.is(n,System.Version.VersionResult)?Bridge.equals(this.m_parsedVersion,n.m_parsedVersion)&&Bridge.equals(this.m_failure,n.m_failure)&&Bridge.equals(this.m_exceptionArgument,n.m_exceptionArgument)&&Bridge.equals(this.m_argumentName,n.m_argumentName)&&Bridge.equals(this.m_canThrow,n.m_canThrow):!1},$clone:function(n){var t=n||new System.Version.VersionResult;return t.m_parsedVersion=this.m_parsedVersion,t.m_failure=this.m_failure,t.m_exceptionArgument=this.m_exceptionArgument,t.m_argumentName=this.m_argumentName,t.m_canThrow=this.m_canThrow,t}});Bridge.define("System.Attribute",{statics:{getCustomAttributes:function(n,t){if(n==null)throw new System.ArgumentNullException("element");if(t==null)throw new System.ArgumentNullException("attributeType");var i=n.at||[];return t?i.filter(function(n){return Bridge.is(n,t)}):i},getCustomAttributes$1:function(n,t,i){if(n==null)throw new System.ArgumentNullException("element");if(t==null)throw new System.ArgumentNullException("attributeType");return n.getCustomAttributes(t||i)}}});Bridge.define("System.ComponentModel.INotifyPropertyChanged",{$kind:"interface"});Bridge.define("System.ComponentModel.PropertyChangedEventArgs",{ctor:function(n,t,i){this.$initialize();this.propertyName=n;this.newValue=t;this.oldValue=i}});t={};t.convert={typeCodes:{Empty:0,Object:1,DBNull:2,Boolean:3,Char:4,SByte:5,Byte:6,Int16:7,UInt16:8,Int32:9,UInt32:10,Int64:11,UInt64:12,Single:13,Double:14,Decimal:15,DateTime:16,String:18},toBoolean:function(n,i){var r,u;switch(typeof n){case"boolean":return n;case"number":return n!==0;case"string":if(r=n.toLowerCase().trim(),r==="true")return!0;if(r==="false")return!1;throw new System.FormatException("String was not recognized as a valid Boolean.");case"object":if(n==null)return!1;if(n instanceof System.Decimal)return!n.isZero();if(System.Int64.is64Bit(n))return n.ne(0)}return u=t.internal.suggestTypeCode(n),t.internal.throwInvalidCastEx(u,t.convert.typeCodes.Boolean),t.convert.convertToType(t.convert.typeCodes.Boolean,n,i||null)},toChar:function(n,i,r){var u=t.convert.typeCodes,f,e;if(n instanceof System.Decimal&&(n=n.toFloat()),(n instanceof System.Int64||n instanceof System.UInt64)&&(n=n.toNumber()),f=typeof n,r=r||t.internal.suggestTypeCode(n),r===u.String&&n==null&&(f="string"),r!==u.Object)switch(f){case"boolean":t.internal.throwInvalidCastEx(u.Boolean,u.Char);case"number":return e=t.internal.isFloatingType(r),(e||n%1!=0)&&t.internal.throwInvalidCastEx(r,u.Char),t.internal.validateNumberRange(n,u.Char,!0),n;case"string":if(n==null)throw new System.ArgumentNullException("value");if(n.length!==1)throw new System.FormatException("String must be exactly one character long.");return n.charCodeAt(0)}if(r===u.Object||f==="object"){if(n==null)return 0;Bridge.isDate(n)&&t.internal.throwInvalidCastEx(u.DateTime,u.Char)}return t.internal.throwInvalidCastEx(r,t.convert.typeCodes.Char),t.convert.convertToType(u.Char,n,i||null)},toSByte:function(n,i,r){return t.internal.toNumber(n,i||null,t.convert.typeCodes.SByte,r||null)},toByte:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Byte)},toInt16:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Int16)},toUInt16:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.UInt16)},toInt32:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Int32)},toUInt32:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.UInt32)},toInt64:function(n,i){var r=t.internal.toNumber(n,i||null,t.convert.typeCodes.Int64);return new System.Int64(r)},toUInt64:function(n,i){var r=t.internal.toNumber(n,i||null,t.convert.typeCodes.UInt64);return new System.UInt64(r)},toSingle:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Single)},toDouble:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Double)},toDecimal:function(n,i){return n instanceof System.Decimal?n:new System.Decimal(t.internal.toNumber(n,i||null,t.convert.typeCodes.Decimal))},toDateTime:function(n,i){var r=t.convert.typeCodes,u,f;switch(typeof n){case"boolean":t.internal.throwInvalidCastEx(r.Boolean,r.DateTime);case"number":u=t.internal.suggestTypeCode(n);t.internal.throwInvalidCastEx(u,r.DateTime);case"string":return Bridge.Date.parse(n,i||null);case"object":if(n==null)return t.internal.getMinValue(r.DateTime);if(Bridge.isDate(n))return n;n instanceof System.Decimal&&t.internal.throwInvalidCastEx(r.Decimal,r.DateTime);n instanceof System.Int64&&t.internal.throwInvalidCastEx(r.Int64,r.DateTime);n instanceof System.UInt64&&t.internal.throwInvalidCastEx(r.UInt64,r.DateTime)}return f=t.internal.suggestTypeCode(n),t.internal.throwInvalidCastEx(f,t.convert.typeCodes.DateTime),t.convert.convertToType(r.DateTime,n,i||null)},toString:function(n,i,r){var u=t.convert.typeCodes,f=typeof n;switch(f){case"boolean":return n?"True":"False";case"number":return(r||null)===u.Char?String.fromCharCode(n):isNaN(n)?"NaN":(n%1!=0&&(n=parseFloat(n.toPrecision(15))),n.toString());case"string":return n;case"object":return n==null?"":Bridge.isDate(n)?Bridge.Date.format(n,null,i||null):n instanceof System.Decimal?n.isInteger()?n.toFixed(0,4):n.toPrecision(n.precision()):System.Int64.is64Bit(n)?n.toString():n.format?n.format(null,i||null):Bridge.getTypeName(n)}return t.convert.convertToType(t.convert.typeCodes.String,n,i||null)},toNumberInBase:function(n,i,r){var h,o,v,c,b,y,p,u,k,s,e,d;if(i!==2&&i!==8&&i!==10&&i!==16)throw new System.ArgumentException("Invalid Base.");if(h=t.convert.typeCodes,n==null)return r===h.Int64?System.Int64.Zero:r===h.UInt64?System.UInt64.Zero:0;if(n.length===0)throw new System.ArgumentOutOfRangeException("Index was out of range. Must be non-negative and less than the size of the collection.");n=n.toLowerCase();var l=t.internal.getMinValue(r),a=t.internal.getMaxValue(r),w=!1,f=0;if(n[f]==="-"){if(i!==10)throw new System.ArgumentException("String cannot contain a minus sign if the base is not 10.");if(l>=0)throw new System.OverflowException("The string was being parsed as an unsigned number and could not have a negative sign.");w=!0;++f}else n[f]==="+"&&++f;if(i===16&&n.length>=2&&n[f]==="0"&&n[f+1]==="x"&&(f+=2),i===2)o=t.internal.charsToCodes("01");else if(i===8)o=t.internal.charsToCodes("01234567");else if(i===10)o=t.internal.charsToCodes("0123456789");else if(i===16)o=t.internal.charsToCodes("0123456789abcdef");else throw new System.ArgumentException("Invalid Base.");for(v={},c=0;c=y&&s<=p))if(e===f)throw new System.FormatException("Could not find any recognizable digits.");else throw new System.FormatException("Additional non-parsable characters are at the end of the string.");if(d=r===h.Int64,u=d?new System.Int64(Bridge.$Long.fromString(n,!1,i)):new System.UInt64(Bridge.$Long.fromString(n,!0,i)),u.toString(i)!==n)throw new System.OverflowException("Value was either too large or too small.");return u}for(u=0,k=a-l+1,e=f;e=y&&s<=p){if(u*=i,u+=v[s],u>t.internal.typeRanges.Int64_MaxValue)throw new System.OverflowException("Value was either too large or too small.");}else if(e===f)throw new System.FormatException("Could not find any recognizable digits.");else throw new System.FormatException("Additional non-parsable characters are at the end of the string.");if(w&&(u*=-1),u>a&&i!==10&&l<0&&(u=u-k),ua)throw new System.OverflowException("Value was either too large or too small.");return u},toStringInBase:function(n,i,r){var w=t.convert.typeCodes,v,e,h,y,p,o,u,f,c;if(i!==2&&i!==8&&i!==10&&i!==16)throw new System.ArgumentException("Invalid Base.");var l=t.internal.getMinValue(r),a=t.internal.getMaxValue(r),s=System.Int64.is64Bit(n);if(s){if(n.lt(l)||n.gt(a))throw new System.OverflowException("Value was either too large or too small for an unsigned byte.");}else if(na)throw new System.OverflowException("Value was either too large or too small for an unsigned byte.");if(v=!1,s)return i===10?n.toString():n.value.toUnsigned().toString(i);if(n<0&&(i===10?(v=!0,n*=-1):n=a+1-l+n),i===2)e="01";else if(i===8)e="01234567";else if(i===10)e="0123456789";else if(i===16)e="0123456789abcdef";else throw new System.ArgumentException("Invalid Base.");for(h={},y=e.split(""),o=0;o0)f=n%i,n=(n-f)/i,c=h[f],u+=c;return v&&(u+="-"),u.split("").reverse().join("")},toBase64String:function(n,i,r,u){var f;if(n==null)throw new System.ArgumentNullException("inArray");if(i=i||0,r=r!=null?r:n.length,u=u||0,r<0)throw new System.ArgumentOutOfRangeException("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offset","Value must be positive.");if(u<0||u>1)throw new System.ArgumentException("Illegal enum value.");if(f=n.length,i>f-r)throw new System.ArgumentOutOfRangeException("offset","Offset and length must refer to a position in the string.");if(f===0)return"";var o=u===1,s=t.internal.toBase64_CalculateAndValidateOutputLength(r,o),e=[];return e.length=s,t.internal.convertToBase64Array(e,n,i,r,o),e.join("")},toBase64CharArray:function(n,i,r,u,f,e){var o,s,c;if(n==null)throw new System.ArgumentNullException("inArray");if(u==null)throw new System.ArgumentNullException("outArray");if(r<0)throw new System.ArgumentOutOfRangeException("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offsetIn","Value must be positive.");if(f<0)throw new System.ArgumentOutOfRangeException("offsetOut","Value must be positive.");if(e=e||0,e<0||e>1)throw new System.ArgumentException("Illegal enum value.");if(o=n.length,i>o-r)throw new System.ArgumentOutOfRangeException("offsetIn","Offset and length must refer to a position in the string.");if(o===0)return 0;var h=e===1,l=u.length,a=t.internal.toBase64_CalculateAndValidateOutputLength(r,h);if(f>l-a)throw new System.ArgumentOutOfRangeException("offsetOut","Either offset did not refer to a position in the string, or there is an insufficient length of destination character array.");return s=[],c=t.internal.convertToBase64Array(s,n,i,r,h),t.internal.charsToCodes(s,u,f),c},fromBase64String:function(n){if(n==null)throw new System.ArgumentNullException("s");var i=n.split("");return t.internal.fromBase64CharPtr(i,0,i.length)},fromBase64CharArray:function(n,i,r){if(n==null)throw new System.ArgumentNullException("inArray");if(r<0)throw new System.ArgumentOutOfRangeException("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offset","Value must be positive.");if(i>n.length-r)throw new System.ArgumentOutOfRangeException("offset","Offset and length must refer to a position in the string.");var u=t.internal.codesToChars(n);return t.internal.fromBase64CharPtr(u,i,r)},convertToType:function(){throw new System.NotSupportedException("IConvertible interface is not supported.");}};t.internal={base64Table:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/","="],typeRanges:{Char_MinValue:0,Char_MaxValue:65535,Byte_MinValue:0,Byte_MaxValue:255,SByte_MinValue:-128,SByte_MaxValue:127,Int16_MinValue:-32768,Int16_MaxValue:32767,UInt16_MinValue:0,UInt16_MaxValue:65535,Int32_MinValue:-2147483648,Int32_MaxValue:2147483647,UInt32_MinValue:0,UInt32_MaxValue:4294967295,Int64_MinValue:System.Int64.MinValue,Int64_MaxValue:System.Int64.MaxValue,UInt64_MinValue:System.UInt64.MinValue,UInt64_MaxValue:System.UInt64.MaxValue,Single_MinValue:-340282347e30,Single_MaxValue:340282347e30,Double_MinValue:-17976931348623157e292,Double_MaxValue:17976931348623157e292,Decimal_MinValue:System.Decimal.MinValue,Decimal_MaxValue:System.Decimal.MaxValue},base64LineBreakPosition:76,getTypeCodeName:function(n){var r=t.convert.typeCodes,u,i,e,f;if(t.internal.typeCodeNames==null){u={};for(i in r)r.hasOwnProperty(i)&&(e=r[i],u[e]=i);t.internal.typeCodeNames=u}if(f=t.internal.typeCodeNames[n],f==null)throw System.ArgumentOutOfRangeException("typeCode","The specified typeCode is undefined.");return f},suggestTypeCode:function(n){var i=t.convert.typeCodes,r=typeof n;switch(r){case"boolean":return i.Boolean;case"number":return n%1!=0?i.Double:i.Int32;case"string":return i.String;case"object":if(Bridge.isDate(n))return i.DateTime;if(n!=null)return i.Object}return null},getMinValue:function(n){var i=t.convert.typeCodes,r;switch(n){case i.Char:return t.internal.typeRanges.Char_MinValue;case i.SByte:return t.internal.typeRanges.SByte_MinValue;case i.Byte:return t.internal.typeRanges.Byte_MinValue;case i.Int16:return t.internal.typeRanges.Int16_MinValue;case i.UInt16:return t.internal.typeRanges.UInt16_MinValue;case i.Int32:return t.internal.typeRanges.Int32_MinValue;case i.UInt32:return t.internal.typeRanges.UInt32_MinValue;case i.Int64:return t.internal.typeRanges.Int64_MinValue;case i.UInt64:return t.internal.typeRanges.UInt64_MinValue;case i.Single:return t.internal.typeRanges.Single_MinValue;case i.Double:return t.internal.typeRanges.Double_MinValue;case i.Decimal:return t.internal.typeRanges.Decimal_MinValue;case i.DateTime:return r=new Date(0),r.setFullYear(1),r;default:return null}},getMaxValue:function(n){var i=t.convert.typeCodes;switch(n){case i.Char:return t.internal.typeRanges.Char_MaxValue;case i.SByte:return t.internal.typeRanges.SByte_MaxValue;case i.Byte:return t.internal.typeRanges.Byte_MaxValue;case i.Int16:return t.internal.typeRanges.Int16_MaxValue;case i.UInt16:return t.internal.typeRanges.UInt16_MaxValue;case i.Int32:return t.internal.typeRanges.Int32_MaxValue;case i.UInt32:return t.internal.typeRanges.UInt32_MaxValue;case i.Int64:return t.internal.typeRanges.Int64_MaxValue;case i.UInt64:return t.internal.typeRanges.UInt64_MaxValue;case i.Single:return t.internal.typeRanges.Single_MaxValue;case i.Double:return t.internal.typeRanges.Double_MaxValue;case i.Decimal:return t.internal.typeRanges.Decimal_MaxValue;default:throw new System.ArgumentOutOfRangeException("typeCode","The specified typeCode is undefined.");}},isFloatingType:function(n){var i=t.convert.typeCodes;return n===i.Single||n===i.Double||n===i.Decimal},toNumber:function(n,i,r,u){var f=t.convert.typeCodes,e=typeof n,o=t.internal.isFloatingType(r),h,c,s;u===f.String&&(e="string");(System.Int64.is64Bit(n)||n instanceof System.Decimal)&&(e="number");switch(e){case"boolean":return n?1:0;case"number":return r===f.Decimal?(t.internal.validateNumberRange(n,r,!0),new System.Decimal(n,i)):r===f.Int64?(t.internal.validateNumberRange(n,r,!0),new System.Int64(n)):r===f.UInt64?(t.internal.validateNumberRange(n,r,!0),new System.UInt64(n)):(System.Int64.is64Bit(n)?n=n.toNumber():n instanceof System.Decimal&&(n=n.toFloat()),o||n%1==0||(n=t.internal.roundToInt(n,r)),o&&(h=t.internal.getMinValue(r),c=t.internal.getMaxValue(r),n>c?n=Infinity:nn||o.toNumber()n||o.toNumber()o)&&this.throwOverflow(f))},throwOverflow:function(n){throw new System.OverflowException("Value was either too large or too small for '"+n+"'.");},roundToInt:function(n,i){var r,f;if(n%1==0)return n;r=n>=0?Math.floor(n):-1*Math.floor(-n);var u=n-r,e=t.internal.getMinValue(i),o=t.internal.getMaxValue(i);if(n>=0){if(n.5||u===.5&&(r&1)!=0)&&++r,r}else if(n>=e-.5)return(u<-.5||u===-.5&&(r&1)!=0)&&--r,r;f=t.internal.getTypeCodeName(i);throw new System.OverflowException("Value was either too large or too small for an '"+f+"'.");},toBase64_CalculateAndValidateOutputLength:function(n,i){var f=t.internal.base64LineBreakPosition,r=~~(n/3)*4,u;if(r+=n%3!=0?4:0,r===0)return 0;if(i&&(u=~~(r/f),r%f==0&&--u,r+=u*2),r>2147483647)throw new System.OutOfMemoryException;return r},convertToBase64Array:function(n,i,r,u,f){for(var s=t.internal.base64Table,a=t.internal.base64LineBreakPosition,c=u%3,l=r+(u-c),h=0,e=0,o=r;o>2],n[e+1]=s[(i[o]&3)<<4|(i[o+1]&240)>>4],n[e+2]=s[(i[o+1]&15)<<2|(i[o+2]&192)>>6],n[e+3]=s[i[o+2]&63],e+=4;o=l;f&&c!==0&&h===t.internal.base64LineBreakPosition&&(n[e++]="\r",n[e++]="\n");switch(c){case 2:n[e]=s[(i[o]&252)>>2];n[e+1]=s[(i[o]&3)<<4|(i[o+1]&240)>>4];n[e+2]=s[(i[o+1]&15)<<2];n[e+3]=s[64];e+=4;break;case 1:n[e]=s[(i[o]&252)>>2];n[e+1]=s[(i[o]&3)<<4];n[e+2]=s[64];n[e+3]=s[64];e+=4}return e},fromBase64CharPtr:function(n,i,r){var u,f,e;if(r<0)throw new System.ArgumentOutOfRangeException("inputLength","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offset","Value must be positive.");while(r>0){if(u=n[i+r-1],u!==" "&&u!=="\n"&&u!=="\r"&&u!=="\t")break;r--}if(f=t.internal.fromBase64_ComputeResultLength(n,i,r),0>f)throw new System.InvalidOperationException("Contract voilation: 0 <= resultLength.");return e=[],e.length=f,t.internal.fromBase64_Decode(n,i,r,e,0,f),e},fromBase64_Decode:function(n,t,i,r,u,f){for(var k=u,a="A".charCodeAt(0),v="a".charCodeAt(0),y="0".charCodeAt(0),p="=".charCodeAt(0),d="+".charCodeAt(0),g="/".charCodeAt(0),nt=" ".charCodeAt(0),tt="\t".charCodeAt(0),it="\n".charCodeAt(0),rt="\r".charCodeAt(0),w="Z".charCodeAt(0)-"A".charCodeAt(0),ut="9".charCodeAt(0)-"0".charCodeAt(0),h=t+i,l=u+f,o,e=255,b=!1,c=!1,s;;){if(t>=h){b=!0;break}if(o=n[t].charCodeAt(0),t++,o-a>>>0<=w)o-=a;else if(o-v>>>0<=w)o-=v-26;else if(o-y>>>0<=ut)o-=y-52;else switch(o){case d:o=62;break;case g:o=63;break;case rt:case it:case nt:case tt:continue;case p:c=!0;break;default:throw new System.FormatException("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");}if(c)break;if(e=e<<6|o,(e&2147483648)!=0){if(l-u<3)return-1;r[u]=255&e>>16;r[u+1]=255&e>>8;r[u+2]=255&e;u+=3;e=255}}if(!b&&!c)throw new System.InvalidOperationException("Contract violation: should never get here.");if(c){if(o!==p)throw new System.InvalidOperationException("Contract violation: currCode == intEq.");if(t===h){if(e<<=6,(e&2147483648)==0)throw new System.FormatException("Invalid length for a Base-64 char array or string.");if(l-u<2)return-1;r[u]=255&e>>16;r[u+1]=255&e>>8;u+=2;e=255}else{while(t>16;u++;e=255}else throw new System.FormatException("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");}}if(e!==255)throw new System.FormatException("Invalid length for a Base-64 char array or string.");return u-k},fromBase64_ComputeResultLength:function(n,t,i){var f;if(i<0)throw new System.ArgumentOutOfRangeException("inputLength","Index was out of range. Must be non-negative and less than the size of the collection.");for(var e=t+i,u=i,r=0;tu)throw new System.InvalidOperationException("Contract violation: 0 <= usefulInputLength.");if(0>r)throw new System.InvalidOperationException("Contract violation: 0 <= padding.");if(r!==0)if(r===1)r=2;else if(r===2)r=1;else throw new System.FormatException("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");return~~(u/4)*3+r},charsToCodes:function(n,t,i){if(n==null)return null;i=i||0;t==null&&(t=[],t.length=n.length);for(var r=0;r-1)throw new System.ArgumentException("Socket cannot have duplicate sub-protocols.","subProtocol");this.requestedSubProtocols.push(n)}});Bridge.define("System.Net.WebSockets.WebSocketReceiveResult",{ctor:function(n,t,i,r,u){this.$initialize();this.count=n;this.messageType=t;this.endOfMessage=i;this.closeStatus=r;this.closeStatusDescription=u},getCount:function(){return this.count},getMessageType:function(){return this.messageType},getEndOfMessage:function(){return this.endOfMessage},getCloseStatus:function(){return this.closeStatus},getCloseStatusDescription:function(){return this.closeStatusDescription}});Bridge.define("System.Uri",{ctor:function(n){this.$initialize();this.absoluteUri=n},getAbsoluteUri:function(){return this.absoluteUri}}),function(n,t){var f={Identity:function(n){return n},True:function(){return!0},Blank:function(){}},o={Boolean:"boolean",Number:"number",String:"string",Object:"object",Undefined:typeof t,Function:typeof function(){}},w={"":f.Identity},r={createLambda:function(n){var t,l,i,a,u,e,r,s,h,v,c;if(n==null)return f.Identity;if(typeof n===o.String){if(t=w[n],t!=null)return t;if(n.indexOf("=>")===-1){for(l=new RegExp("[$]+","g"),i=0;(a=l.exec(n))!=null;)u=a[0].length,u>i&&(i=u);for(e=[],r=1;r<=i;r++){for(s="",h=0;h(.*)/),t=new Function(c[1],"return "+c[2]),w[n]=t,t}return n},isIEnumerable:function(n){if(typeof Enumerator!==o.Undefined)try{return new Enumerator(n),!0}catch(t){}return!1},defineProperty:Object.defineProperties!=null?function(n,t,i){Object.defineProperty(n,t,{enumerable:!1,configurable:!0,writable:!0,value:i})}:function(n,t,i){n[t]=i},compare:function(n,t){return n===t?0:n>t?1:-1},dispose:function(n){n!=null&&n.dispose()}},l={Before:0,Running:1,After:2},u=function(n,t,i){var u=new b,r=l.Before;this.getCurrent=u.getCurrent;this.reset=function(){throw new Error("Reset is not supported");};this.moveNext=function(){try{switch(r){case l.Before:r=l.Running;n();case l.Running:return t.apply(u)?!0:(this.dispose(),!1);case l.After:return!1}}catch(i){this.dispose();throw i;}};this.dispose=function(){if(r==l.Running)try{i()}finally{r=l.After}};this.getCurrent$1=this.getCurrent;this.System$Collections$IEnumerator$getCurrent=this.getCurrent;this.System$Collections$IEnumerator$moveNext=this.moveNext;this.System$Collections$IEnumerator$reset=this.reset},b,i,k,s,a,y,e,h,c,p,v;u.$$inherits=[];Bridge.Class.addExtend(u,[System.IDisposable,System.Collections.IEnumerator]);b=function(){var n=null;this.getCurrent=function(){return n};this.yieldReturn=function(t){return n=t,!0};this.yieldBreak=function(){return!1}};i=function(n){this.getEnumerator=n};i.$$inherits=[];Bridge.Class.addExtend(i,[System.Collections.IEnumerable]);i.Utils={};i.Utils.createLambda=function(n){return r.createLambda(n)};i.Utils.createEnumerable=function(n){return new i(n)};i.Utils.createEnumerator=function(n,t,i){return new u(n,t,i)};i.Utils.extendTo=function(n){var u=n.prototype,o,t,f;n===Array?(o=e.prototype,r.defineProperty(u,"getSource",function(){return this})):(o=i.prototype,r.defineProperty(u,"getEnumerator",function(){return i.from(this).getEnumerator()}));for(t in o)(f=o[t],u[t]!=f)&&(u[t]==null||(t=t+"ByLinq",u[t]!=f))&&f instanceof Function&&r.defineProperty(u,t,f)};i.choice=function(){var n=arguments;return new i(function(){return new u(function(){n=n[0]instanceof Array?n[0]:n[0].getEnumerator!=null?n[0].toArray():n},function(){return this.yieldReturn(n[Math.floor(Math.random()*n.length)])},f.Blank)})};i.cycle=function(){var n=arguments;return new i(function(){var t=0;return new u(function(){n=n[0]instanceof Array?n[0]:n[0].getEnumerator!=null?n[0].toArray():n},function(){return t>=n.length&&(t=0),this.yieldReturn(n[t++])},f.Blank)})};k=new i(function(){return new u(f.Blank,function(){return!1},f.Blank)});i.empty=function(){return k};i.from=function(n){if(n==null)return i.empty();if(n instanceof i)return n;if(typeof n==o.Number||typeof n==o.Boolean)return i.repeat(n,1);if(typeof n==o.String)return new i(function(){var t=0;return new u(f.Blank,function(){return t=t?this.yieldReturn(n):this.yieldBreak()},f.Blank)})};i.repeat=function(n,t){return t!=null?i.repeat(n).take(t):new i(function(){return new u(f.Blank,function(){return this.yieldReturn(n)},f.Blank)})};i.repeatWithFinalize=function(n,t){return n=r.createLambda(n),t=r.createLambda(t),new i(function(){var i;return new u(function(){i=n()},function(){return this.yieldReturn(i)},function(){i!=null&&(t(i),i=null)})})};i.generate=function(n,t){return t!=null?i.generate(n).take(t):(n=r.createLambda(n),new i(function(){return new u(f.Blank,function(){return this.yieldReturn(n())},f.Blank)}))};i.toInfinity=function(n,t){return n==null&&(n=0),t==null&&(t=1),new i(function(){var i;return new u(function(){i=n-t},function(){return this.yieldReturn(i+=t)},f.Blank)})};i.toNegativeInfinity=function(n,t){return n==null&&(n=0),t==null&&(t=1),new i(function(){var i;return new u(function(){i=n+t},function(){return this.yieldReturn(i-=t)},f.Blank)})};i.unfold=function(n,t){return t=r.createLambda(t),new i(function(){var r=!0,i;return new u(f.Blank,function(){return r?(r=!1,i=n,this.yieldReturn(i)):(i=t(i),this.yieldReturn(i))},f.Blank)})};i.defer=function(n){return new i(function(){var t;return new u(function(){t=i.from(n()).getEnumerator()},function(){return t.moveNext()?this.yieldReturn(t.getCurrent()):this.yieldBreak()},function(){r.dispose(t)})})};i.prototype.traverseBreadthFirst=function(n,t){var f=this;return n=r.createLambda(n),t=r.createLambda(t),new i(function(){var e,s=0,o=[];return new u(function(){e=f.getEnumerator()},function(){for(;;){if(e.moveNext())return o.push(e.getCurrent()),this.yieldReturn(t(e.getCurrent(),s));var u=i.from(o).selectMany(function(t){return n(t)});if(u.any())s++,o=[],r.dispose(e),e=u.getEnumerator();else return!1}},function(){r.dispose(e)})})};i.prototype.traverseDepthFirst=function(n,t){var f=this;return n=r.createLambda(n),t=r.createLambda(t),new i(function(){var o=[],e;return new u(function(){e=f.getEnumerator()},function(){for(;;){if(e.moveNext()){var u=t(e.getCurrent(),o.length);return o.push(e),e=i.from(n(e.getCurrent())).getEnumerator(),this.yieldReturn(u)}if(o.length<=0)return!1;r.dispose(e);e=o.pop()}},function(){try{r.dispose(e)}finally{i.from(o).forEach(function(n){n.dispose()})}})})};i.prototype.flatten=function(){var n=this;return new i(function(){var e,t=null;return new u(function(){e=n.getEnumerator()},function(){for(;;){if(t!=null){if(t.moveNext())return this.yieldReturn(t.getCurrent());t=null}if(e.moveNext())if(e.getCurrent()instanceof Array){r.dispose(t);t=i.from(e.getCurrent()).selectMany(f.Identity).flatten().getEnumerator();continue}else return this.yieldReturn(e.getCurrent());return!1}},function(){try{r.dispose(e)}finally{r.dispose(t)}})})};i.prototype.pairwise=function(n){var t=this;return n=r.createLambda(n),new i(function(){var i;return new u(function(){i=t.getEnumerator();i.moveNext()},function(){var t=i.getCurrent();return i.moveNext()?this.yieldReturn(n(t,i.getCurrent())):!1},function(){r.dispose(i)})})};i.prototype.scan=function(n,t){var f,e;return t==null?(t=r.createLambda(n),f=!1):(t=r.createLambda(t),f=!0),e=this,new i(function(){var i,o,s=!0;return new u(function(){i=e.getEnumerator()},function(){if(s){if(s=!1,f)return this.yieldReturn(o=n);if(i.moveNext())return this.yieldReturn(o=i.getCurrent())}return i.moveNext()?this.yieldReturn(o=t(o,i.getCurrent())):!1},function(){r.dispose(i)})})};i.prototype.select=function(n){if(n=r.createLambda(n),n.length<=1)return new c(this,null,n);var t=this;return new i(function(){var i,f=0;return new u(function(){i=t.getEnumerator()},function(){return i.moveNext()?this.yieldReturn(n(i.getCurrent(),f++)):!1},function(){r.dispose(i)})})};i.prototype.selectMany=function(n,f){var e=this;return n=r.createLambda(n),f==null&&(f=function(n,t){return t}),f=r.createLambda(f),new i(function(){var s,o=t,h=0;return new u(function(){s=e.getEnumerator()},function(){if(o===t&&!s.moveNext())return!1;do{if(o==null){var u=n(s.getCurrent(),h++);o=i.from(u).getEnumerator()}if(o.moveNext())return this.yieldReturn(f(s.getCurrent(),o.getCurrent()));r.dispose(o);o=null}while(s.moveNext());return!1},function(){try{r.dispose(s)}finally{r.dispose(o)}})})};i.prototype.where=function(n){if(n=r.createLambda(n),n.length<=1)return new h(this,n);var t=this;return new i(function(){var i,f=0;return new u(function(){i=t.getEnumerator()},function(){while(i.moveNext())if(n(i.getCurrent(),f++))return this.yieldReturn(i.getCurrent());return!1},function(){r.dispose(i)})})};i.prototype.choose=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i,f=0;return new u(function(){i=t.getEnumerator()},function(){while(i.moveNext()){var t=n(i.getCurrent(),f++);if(t!=null)return this.yieldReturn(t)}return this.yieldBreak()},function(){r.dispose(i)})})};i.prototype.ofType=function(n){var t=this;return new i(function(){var i;return new u(function(){i=Bridge.getEnumerator(t)},function(){while(i.moveNext()){var t=Bridge.as(i.getCurrent(),n);if(Bridge.hasValue(t))return this.yieldReturn(t)}return!1},function(){r.dispose(i)})})};i.prototype.zip=function(){var e=arguments,n=r.createLambda(arguments[arguments.length-1]),t=this,f;return arguments.length==2?(f=arguments[0],new i(function(){var e,o,s=0;return new u(function(){e=t.getEnumerator();o=i.from(f).getEnumerator()},function(){return e.moveNext()&&o.moveNext()?this.yieldReturn(n(e.getCurrent(),o.getCurrent(),s++)):!1},function(){try{r.dispose(e)}finally{r.dispose(o)}})})):new i(function(){var f,o=0;return new u(function(){var n=i.make(t).concat(i.from(e).takeExceptLast().select(i.from)).select(function(n){return n.getEnumerator()}).toArray();f=i.from(n)},function(){if(f.all(function(n){return n.moveNext()})){var t=f.select(function(n){return n.getCurrent()}).toArray();return t.push(o++),this.yieldReturn(n.apply(null,t))}return this.yieldBreak()},function(){i.from(f).forEach(r.dispose)})})};i.prototype.merge=function(){var n=arguments,t=this;return new i(function(){var f,e=-1;return new u(function(){f=i.make(t).concat(i.from(n).select(i.from)).select(function(n){return n.getEnumerator()}).toArray()},function(){while(f.length>0){e=e>=f.length-1?0:e+1;var n=f[e];if(n.moveNext())return this.yieldReturn(n.getCurrent());n.dispose();f.splice(e--,1)}return this.yieldBreak()},function(){i.from(f).forEach(r.dispose)})})};i.prototype.join=function(n,e,o,s,h){e=r.createLambda(e);o=r.createLambda(o);s=r.createLambda(s);var c=this;return new i(function(){var l,v,a=null,y=0;return new u(function(){l=c.getEnumerator();v=i.from(n).toLookup(o,f.Identity,h)},function(){for(var n,i;;){if(a!=null){if(n=a[y++],n!==t)return this.yieldReturn(s(l.getCurrent(),n));n=null;y=0}if(l.moveNext())i=e(l.getCurrent()),a=v.get(i).toArray();else return!1}},function(){r.dispose(l)})})};i.prototype.groupJoin=function(n,t,e,o,s){t=r.createLambda(t);e=r.createLambda(e);o=r.createLambda(o);var h=this;return new i(function(){var c=h.getEnumerator(),l=null;return new u(function(){c=h.getEnumerator();l=i.from(n).toLookup(e,f.Identity,s)},function(){if(c.moveNext()){var n=l.get(t(c.getCurrent()));return this.yieldReturn(o(c.getCurrent(),n))}return!1},function(){r.dispose(c)})})};i.prototype.all=function(n){n=r.createLambda(n);var t=!0;return this.forEach(function(i){if(!n(i))return t=!1,!1}),t};i.prototype.any=function(n){n=r.createLambda(n);var t=this.getEnumerator();try{if(arguments.length==0)return t.moveNext();while(t.moveNext())if(n(t.getCurrent()))return!0;return!1}finally{r.dispose(t)}};i.prototype.isEmpty=function(){return!this.any()};i.prototype.concat=function(){var n=this,t,f;return arguments.length==1?(t=arguments[0],new i(function(){var e,f;return new u(function(){e=n.getEnumerator()},function(){if(f==null){if(e.moveNext())return this.yieldReturn(e.getCurrent());f=i.from(t).getEnumerator()}return f.moveNext()?this.yieldReturn(f.getCurrent()):!1},function(){try{r.dispose(e)}finally{r.dispose(f)}})})):(f=arguments,new i(function(){var t;return new u(function(){t=i.make(n).concat(i.from(f).select(i.from)).select(function(n){return n.getEnumerator()}).toArray()},function(){while(t.length>0){var n=t[0];if(n.moveNext())return this.yieldReturn(n.getCurrent());n.dispose();t.splice(0,1)}return this.yieldBreak()},function(){i.from(t).forEach(r.dispose)})}))};i.prototype.insert=function(n,t){var f=this;return new i(function(){var o,e,s=0,h=!1;return new u(function(){o=f.getEnumerator();e=i.from(t).getEnumerator()},function(){return s==n&&e.moveNext()?(h=!0,this.yieldReturn(e.getCurrent())):o.moveNext()?(s++,this.yieldReturn(o.getCurrent())):!h&&e.moveNext()?this.yieldReturn(e.getCurrent()):!1},function(){try{r.dispose(o)}finally{r.dispose(e)}})})};i.prototype.alternate=function(n){var t=this;return new i(function(){var f,e,s,o;return new u(function(){s=n instanceof Array||n.getEnumerator!=null?i.from(i.from(n).toArray()):i.make(n);e=t.getEnumerator();e.moveNext()&&(f=e.getCurrent())},function(){for(;;){if(o!=null){if(o.moveNext())return this.yieldReturn(o.getCurrent());o=null}if(f==null&&e.moveNext()){f=e.getCurrent();o=s.getEnumerator();continue}else if(f!=null){var n=f;return f=null,this.yieldReturn(n)}return this.yieldBreak()}},function(){try{r.dispose(e)}finally{r.dispose(o)}})})};i.prototype.contains=function(n,t){t=t||System.Collections.Generic.EqualityComparer$1.$default;var i=this.getEnumerator();try{while(i.moveNext())if(t.equals2(i.getCurrent(),n))return!0;return!1}finally{r.dispose(i)}};i.prototype.defaultIfEmpty=function(n){var f=this;return n===t&&(n=null),new i(function(){var t,i=!0;return new u(function(){t=f.getEnumerator()},function(){return t.moveNext()?(i=!1,this.yieldReturn(t.getCurrent())):i?(i=!1,this.yieldReturn(n)):!1},function(){r.dispose(t)})})};i.prototype.distinct=function(n){return this.except(i.empty(),n)};i.prototype.distinctUntilChanged=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i,f,e;return new u(function(){i=t.getEnumerator()},function(){while(i.moveNext()){var t=n(i.getCurrent());if(e)return e=!1,f=t,this.yieldReturn(i.getCurrent());if(f!==t)return f=t,this.yieldReturn(i.getCurrent())}return this.yieldBreak()},function(){r.dispose(i)})})};i.prototype.except=function(n,t){var f=this;return new i(function(){var o,e;return new u(function(){o=f.getEnumerator();e=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,t);i.from(n).forEach(function(n){e.containsKey(n)||e.add(n)})},function(){while(o.moveNext()){var n=o.getCurrent();if(!e.containsKey(n))return e.add(n),this.yieldReturn(n)}return!1},function(){r.dispose(o)})})};i.prototype.intersect=function(n,t){var f=this;return new i(function(){var e,o,s;return new u(function(){e=f.getEnumerator();o=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,t);i.from(n).forEach(function(n){o.containsKey(n)||o.add(n)});s=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,t)},function(){while(e.moveNext()){var n=e.getCurrent();if(!s.containsKey(n)&&o.containsKey(n))return s.add(n),this.yieldReturn(n)}return!1},function(){r.dispose(e)})})};i.prototype.sequenceEqual=function(n,t){var f,u;t=t||System.Collections.Generic.EqualityComparer$1.$default;f=this.getEnumerator();try{u=i.from(n).getEnumerator();try{while(f.moveNext())if(!u.moveNext()||!t.equals2(f.getCurrent(),u.getCurrent()))return!1;return u.moveNext()?!1:!0}finally{r.dispose(u)}}finally{r.dispose(f)}};i.prototype.union=function(n,f){var e=this;return new i(function(){var h,o,s;return new u(function(){h=e.getEnumerator();s=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,f)},function(){var r;if(o===t){while(h.moveNext())if(r=h.getCurrent(),!s.containsKey(r))return s.add(r),this.yieldReturn(r);o=i.from(n).getEnumerator()}while(o.moveNext())if(r=o.getCurrent(),!s.containsKey(r))return s.add(r),this.yieldReturn(r);return!1},function(){try{r.dispose(h)}finally{r.dispose(o)}})})};i.prototype.orderBy=function(n,t){return new s(this,n,t,!1)};i.prototype.orderByDescending=function(n,t){return new s(this,n,t,!0)};i.prototype.reverse=function(){var n=this;return new i(function(){var t,i;return new u(function(){t=n.toArray();i=t.length},function(){return i>0?this.yieldReturn(t[--i]):!1},f.Blank)})};i.prototype.shuffle=function(){var n=this;return new i(function(){var t;return new u(function(){t=n.toArray()},function(){if(t.length>0){var n=Math.floor(Math.random()*t.length);return this.yieldReturn(t.splice(n,1)[0])}return!1},f.Blank)})};i.prototype.weightedSample=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i,r=0;return new u(function(){i=t.choose(function(t){var i=n(t);return i<=0?null:(r+=i,{value:t,bound:r})}).toArray()},function(){var t;if(i.length>0){for(var f=Math.floor(Math.random()*r)+1,u=-1,n=i.length;n-u>1;)t=Math.floor((u+n)/2),i[t].bound>=f?n=t:u=t;return this.yieldReturn(i[n].value)}return this.yieldBreak()},f.Blank)})};i.prototype.groupBy=function(n,t,f,e){var o=this;return n=r.createLambda(n),t=r.createLambda(t),f!=null&&(f=r.createLambda(f)),new i(function(){var i;return new u(function(){i=o.toLookup(n,t,e).toEnumerable().getEnumerator()},function(){while(i.moveNext())return f==null?this.yieldReturn(i.getCurrent()):this.yieldReturn(f(i.getCurrent().key(),i.getCurrent()));return!1},function(){r.dispose(i)})})};i.prototype.partitionBy=function(n,t,f,e){var s=this,o;return n=r.createLambda(n),t=r.createLambda(t),e=e||System.Collections.Generic.EqualityComparer$1.$default,f==null?(o=!1,f=function(n,t){return new v(n,t)}):(o=!0,f=r.createLambda(f)),new i(function(){var h,l,c=[];return new u(function(){h=s.getEnumerator();h.moveNext()&&(l=n(h.getCurrent()),c.push(t(h.getCurrent())))},function(){for(var r,u;(r=h.moveNext())==!0;)if(e.equals2(l,n(h.getCurrent())))c.push(t(h.getCurrent()));else break;return c.length>0?(u=o?f(l,i.from(c)):f(l,c),r?(l=n(h.getCurrent()),c=[t(h.getCurrent())]):c=[],this.yieldReturn(u)):!1},function(){r.dispose(h)})})};i.prototype.buffer=function(n){var t=this;return new i(function(){var i;return new u(function(){i=t.getEnumerator()},function(){for(var t=[],r=0;i.moveNext();)if(t.push(i.getCurrent()),++r>=n)return this.yieldReturn(t);return t.length>0?this.yieldReturn(t):!1},function(){r.dispose(i)})})};i.prototype.aggregate=function(n,t,i){return i=r.createLambda(i),i(this.scan(n,t,i).last())};i.prototype.average=function(n,t){!n||t||Bridge.isFunction(n)||(t=n,n=null);n=r.createLambda(n);var i=t||0,u=0;if(this.forEach(function(t){t=n(t);t instanceof System.Decimal||System.Int64.is64Bit(t)?i=t.add(i):i instanceof System.Decimal||System.Int64.is64Bit(i)?i=i.add(t):i+=t;++u}),u===0)throw new System.InvalidOperationException("Sequence contains no elements");return i instanceof System.Decimal||System.Int64.is64Bit(i)?i.div(u):i/u};i.prototype.nullableAverage=function(n,t){return this.any(Bridge.isNull)?null:this.average(n,t)};i.prototype.count=function(n){n=n==null?f.True:r.createLambda(n);var t=0;return this.forEach(function(i,r){n(i,r)&&++t}),t};i.prototype.max=function(n){return n==null&&(n=f.Identity),this.select(n).aggregate(function(n,t){return Bridge.compare(n,t,!0)===1?n:t})};i.prototype.nullableMax=function(n){return this.any(Bridge.isNull)?null:this.max(n)};i.prototype.min=function(n){return n==null&&(n=f.Identity),this.select(n).aggregate(function(n,t){return Bridge.compare(n,t,!0)===-1?n:t})};i.prototype.nullableMin=function(n){return this.any(Bridge.isNull)?null:this.min(n)};i.prototype.maxBy=function(n){return n=r.createLambda(n),this.aggregate(function(t,i){return Bridge.compare(n(t),n(i),!0)===1?t:i})};i.prototype.minBy=function(n){return n=r.createLambda(n),this.aggregate(function(t,i){return Bridge.compare(n(t),n(i),!0)===-1?t:i})};i.prototype.sum=function(n,t){!n||t||Bridge.isFunction(n)||(t=n,n=null);n==null&&(n=f.Identity);var i=this.select(n).aggregate(0,function(n,t){return n instanceof System.Decimal||System.Int64.is64Bit(n)?n.add(t):t instanceof System.Decimal||System.Int64.is64Bit(t)?t.add(n):n+t});return i===0&&t?t:i};i.prototype.nullableSum=function(n,t){return this.any(Bridge.isNull)?null:this.sum(n,t)};i.prototype.elementAt=function(n){var t,i=!1;if(this.forEach(function(r,u){if(u==n)return t=r,i=!0,!1}),!i)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return t};i.prototype.elementAtOrDefault=function(n,i){i===t&&(i=null);var r,u=!1;return this.forEach(function(t,i){if(i==n)return r=t,u=!0,!1}),u?r:i};i.prototype.first=function(n){if(n!=null)return this.where(n).first();var t,i=!1;if(this.forEach(function(n){return t=n,i=!0,!1}),!i)throw new Error("first:No element satisfies the condition.");return t};i.prototype.firstOrDefault=function(n,i){if(i===t&&(i=null),n!=null)return this.where(n).firstOrDefault(null,i);var r,u=!1;return this.forEach(function(n){return r=n,u=!0,!1}),u?r:i};i.prototype.last=function(n){if(n!=null)return this.where(n).last();var t,i=!1;if(this.forEach(function(n){i=!0;t=n}),!i)throw new Error("last:No element satisfies the condition.");return t};i.prototype.lastOrDefault=function(n,i){if(i===t&&(i=null),n!=null)return this.where(n).lastOrDefault(null,i);var r,u=!1;return this.forEach(function(n){u=!0;r=n}),u?r:i};i.prototype.single=function(n){if(n!=null)return this.where(n).single();var i,t=!1;if(this.forEach(function(n){if(t)throw new Error("single:sequence contains more than one element.");else t=!0,i=n}),!t)throw new Error("single:No element satisfies the condition.");return i};i.prototype.singleOrDefault=function(n,i){if(i===t&&(i=null),n!=null)return this.where(n).singleOrDefault(null,i);var u,r=!1;return this.forEach(function(n){if(r)throw new Error("single:sequence contains more than one element.");else r=!0,u=n}),r?u:i};i.prototype.skip=function(n){var t=this;return new i(function(){var i,f=0;return new u(function(){for(i=t.getEnumerator();f++")})};i.prototype.force=function(){var n=this.getEnumerator();try{while(n.moveNext());}finally{r.dispose(n)}};i.prototype.letBind=function(n){n=r.createLambda(n);var t=this;return new i(function(){var f;return new u(function(){f=i.from(n(t)).getEnumerator()},function(){return f.moveNext()?this.yieldReturn(f.getCurrent()):!1},function(){r.dispose(f)})})};i.prototype.share=function(){var i=this,n,t=!1;return new y(function(){return new u(function(){n==null&&(n=i.getEnumerator())},function(){if(t)throw new Error("enumerator is disposed");return n.moveNext()?this.yieldReturn(n.getCurrent()):!1},f.Blank)},function(){t=!0;r.dispose(n)})};i.prototype.memoize=function(){var e=this,n,t,i=!1;return new y(function(){var r=-1;return new u(function(){t==null&&(t=e.getEnumerator(),n=[])},function(){if(i)throw new Error("enumerator is disposed");return(r++,n.length<=r)?t.moveNext()?this.yieldReturn(n[r]=t.getCurrent()):!1:this.yieldReturn(n[r])},f.Blank)},function(){i=!0;r.dispose(t);n=null})};i.prototype.catchError=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i;return new u(function(){i=t.getEnumerator()},function(){try{return i.moveNext()?this.yieldReturn(i.getCurrent()):!1}catch(t){return n(t),!1}},function(){r.dispose(i)})})};i.prototype.finallyAction=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i;return new u(function(){i=t.getEnumerator()},function(){return i.moveNext()?this.yieldReturn(i.getCurrent()):!1},function(){try{r.dispose(i)}finally{n()}})})};i.prototype.log=function(n){return n=r.createLambda(n),this.doAction(function(t){typeof console!==o.Undefined&&console.log(n(t))})};i.prototype.trace=function(n,t){return n==null&&(n="Trace"),t=r.createLambda(t),this.doAction(function(i){typeof console!==o.Undefined&&console.log(n,t(i))})};s=function(n,t,i,u,f){this.source=n;this.keySelector=r.createLambda(t);this.comparer=i||System.Collections.Generic.Comparer$1.$default;this.descending=u;this.parent=f};s.prototype=new i;s.prototype.createOrderedEnumerable=function(n,t,i){return new s(this.source,n,t,i,this)};s.prototype.thenBy=function(n,t){return this.createOrderedEnumerable(n,t,!1)};s.prototype.thenByDescending=function(n,t){return this.createOrderedEnumerable(n,t,!0)};s.prototype.getEnumerator=function(){var i=this,t,n,r=0;return new u(function(){t=[];n=[];i.source.forEach(function(i,r){t.push(i);n.push(r)});var r=a.create(i,null);r.GenerateKeys(t);n.sort(function(n,t){return r.compare(n,t)})},function(){return r0:i.prototype.any.apply(this,arguments)};e.prototype.count=function(n){return n==null?this.getSource().length:i.prototype.count.apply(this,arguments)};e.prototype.elementAt=function(n){var t=this.getSource();return 0<=n&&n0?t[0]:i.prototype.first.apply(this,arguments)};e.prototype.firstOrDefault=function(n,r){if(r===t&&(r=null),n!=null)return i.prototype.firstOrDefault.apply(this,arguments);var u=this.getSource();return u.length>0?u[0]:r};e.prototype.last=function(n){var t=this.getSource();return n==null&&t.length>0?t[t.length-1]:i.prototype.last.apply(this,arguments)};e.prototype.lastOrDefault=function(n,r){if(r===t&&(r=null),n!=null)return i.prototype.lastOrDefault.apply(this,arguments);var u=this.getSource();return u.length>0?u[u.length-1]:r};e.prototype.skip=function(n){var t=this.getSource();return new i(function(){var i;return new u(function(){i=n<0?0:n},function(){return i0?this.yieldReturn(n[--t]):!1},f.Blank)})};e.prototype.sequenceEqual=function(n,t){return(n instanceof e||n instanceof Array)&&t==null&&i.from(n).count()!=this.count()?!1:i.prototype.sequenceEqual.apply(this,arguments)};e.prototype.toJoinedString=function(n,t){var r=this.getSource();return t!=null||!(r instanceof Array)?i.prototype.toJoinedString.apply(this,arguments):(n==null&&(n=""),r.join(n))};e.prototype.getEnumerator=function(){return new Bridge.ArrayEnumerator(this.getSource())};h=function(n,t){this.prevSource=n;this.prevPredicate=t};h.prototype=new i;h.prototype.where=function(n){if(n=r.createLambda(n),n.length<=1){var t=this.prevPredicate,u=function(i){return t(i)&&n(i)};return new h(this.prevSource,u)}return i.prototype.where.call(this,n)};h.prototype.select=function(n){return n=r.createLambda(n),n.length<=1?new c(this.prevSource,this.prevPredicate,n):i.prototype.select.call(this,n)};h.prototype.getEnumerator=function(){var t=this.prevPredicate,i=this.prevSource,n;return new u(function(){n=i.getEnumerator()},function(){while(n.moveNext())if(t(n.getCurrent()))return this.yieldReturn(n.getCurrent());return!1},function(){r.dispose(n)})};c=function(n,t,i){this.prevSource=n;this.prevPredicate=t;this.prevSelector=i};c.prototype=new i;c.prototype.where=function(n){return n=r.createLambda(n),n.length<=1?new h(this,n):i.prototype.where.call(this,n)};c.prototype.select=function(n){if(n=r.createLambda(n),n.length<=1){var t=this.prevSelector,u=function(i){return n(t(i))};return new c(this.prevSource,this.prevPredicate,u)}return i.prototype.select.call(this,n)};c.prototype.getEnumerator=function(){var t=this.prevPredicate,i=this.prevSelector,f=this.prevSource,n;return new u(function(){n=f.getEnumerator()},function(){while(n.moveNext())if(t==null||t(n.getCurrent()))return this.yieldReturn(i(n.getCurrent()));return!1},function(){r.dispose(n)})};p=function(n,t){this.count=function(){return n.getCount()};this.get=function(t){var r={v:null},u=n.tryGetValue(t,r);return i.from(u?r.v:[])};this.contains=function(t){return n.containsKey(t)};this.toEnumerable=function(){return i.from(t).select(function(t){return new v(t,n.get(t))})};this.getEnumerator=function(){return this.toEnumerable().getEnumerator()}};p.$$inherits=[];Bridge.Class.addExtend(p,[System.Collections.IEnumerable]);v=function(n,t){this.key=function(){return n};e.call(this,t)};v.prototype=new e;v.$$inherits=[];Bridge.Class.addExtend(v,[System.Collections.IEnumerable]);Bridge.Linq={};Bridge.Linq.Enumerable=i;System.Linq={};System.Linq.Enumerable=i}(Bridge.global);Bridge.define("System.Guid",{inherits:function(){return[System.IEquatable$1(System.Guid),System.IComparable$1(System.Guid),System.IFormattable]},$kind:"struct",statics:{error1:"Byte array for GUID must be exactly {0} bytes long",valid:null,split:null,nonFormat:null,replace:null,rnd:null,config:{init:function(){this.valid=new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","i");this.split=new RegExp("^(.{8})(.{4})(.{4})(.{4})(.{12})$");this.nonFormat=new RegExp("^[{(]?([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})[)}]?$","i");this.replace=new RegExp("-","g");this.rnd=new System.Random.ctor;this.empty=new System.Guid.ctor}},parse:function(n){return System.Guid.parseExact(n,null)},parseExact:function(n,t){var i=new System.Guid.ctor;return i.parseInternal(n,t,!0),i},tryParse:function(n,t){return System.Guid.tryParseExact(n,null,t)},tryParseExact:function(n,t,i){return i.v=new System.Guid.ctor,i.v.parseInternal(n,t,!1)},newGuid:function(){var n=System.Array.init(16,0,System.Byte);return System.Guid.rnd.nextBytes(n),n[7]=(n[7]&15|64)&255,n[8]=(n[8]&191|128)&255,new System.Guid.$ctor1(n)},makeBinary:function(n){return System.Int32.format(n&255,"x2")},op_Equality:function(n,t){return Bridge.referenceEquals(n,null)?Bridge.referenceEquals(t,null):n.equalsT(t)},op_Inequality:function(n,t){return!System.Guid.op_Equality(n,t)},getDefaultValue:function(){return new System.Guid}},_a:0,_b:0,_c:0,_d:0,_e:0,_f:0,_g:0,_h:0,_i:0,_j:0,_k:0,config:{alias:["equalsT","System$IEquatable$1$System$Guid$equalsT","compareTo","System$IComparable$1$System$Guid$compareTo","format","System$IFormattable$format"]},$ctor4:function(n){this.$initialize();(new System.Guid.ctor).$clone(this);this.parseInternal(n,null,!0)},$ctor1:function(n){if(this.$initialize(),n==null)throw new System.ArgumentNullException("b");if(n.length!==16)throw new System.ArgumentException(System.String.format(System.Guid.error1,16));this._a=n[3]<<24|n[2]<<16|n[1]<<8|n[0];this._b=Bridge.Int.sxs((n[5]<<8|n[4])&65535);this._c=Bridge.Int.sxs((n[7]<<8|n[6])&65535);this._d=n[8];this._e=n[9];this._f=n[10];this._g=n[11];this._h=n[12];this._i=n[13];this._j=n[14];this._k=n[15]},$ctor5:function(n,t,i,r,u,f,e,o,s,h,c){this.$initialize();this._a=n|0;this._b=Bridge.Int.sxs(t&65535);this._c=Bridge.Int.sxs(i&65535);this._d=r;this._e=u;this._f=f;this._g=e;this._h=o;this._i=s;this._j=h;this._k=c},$ctor3:function(n,t,i,r){if(this.$initialize(),r==null)throw new System.ArgumentNullException("d");if(r.length!==8)throw new System.ArgumentException(System.String.format(System.Guid.error1,8));this._a=n;this._b=t;this._c=i;this._d=r[0];this._e=r[1];this._f=r[2];this._g=r[3];this._h=r[4];this._i=r[5];this._j=r[6];this._k=r[7]},$ctor2:function(n,t,i,r,u,f,e,o,s,h,c){this.$initialize();this._a=n;this._b=t;this._c=i;this._d=r;this._e=u;this._f=f;this._g=e;this._h=o;this._i=s;this._j=h;this._k=c},ctor:function(){this.$initialize()},equalsT:function(n){return this._a!==n._a||this._b!==n._b||this._c!==n._c||this._d!==n._d||this._e!==n._e||this._f!==n._f||this._g!==n._g||this._h!==n._h||this._i!==n._i||this._j!==n._j||this._k!==n._k?!1:!0},compareTo:function(n){return System.String.compare(this.toString(),n.toString())},toString:function(){return this.format$1(null)},toString$1:function(n){return this.format$1(n)},format:function(n){return this.format$1(n)},toByteArray:function(){var n=System.Array.init(16,0,System.Byte);return n[0]=this._a&255,n[1]=this._a>>8&255,n[2]=this._a>>16&255,n[3]=this._a>>24&255,n[4]=this._b&255,n[5]=this._b>>8&255,n[6]=this._c&255,n[7]=this._c>>8&255,n[8]=this._d,n[9]=this._e,n[10]=this._f,n[11]=this._g,n[12]=this._h,n[13]=this._i,n[14]=this._j,n[15]=this._k,n},parseInternal:function(n,t,i){var u=null,f,r,e,o;if(System.String.isNullOrEmpty(n))throw new System.ArgumentNullException("input");if(System.String.isNullOrEmpty(t)?(f=System.Guid.nonFormat.exec(n),f!=null&&(u=f.slice(1).join("-").toLowerCase())):(t=t.toUpperCase(),r=!1,Bridge.referenceEquals(t,"N")?(e=System.Guid.split.exec(n),e!=null&&(r=!0,n=e.slice(1).join("-"))):Bridge.referenceEquals(t,"B")||Bridge.referenceEquals(t,"P")?(o=Bridge.referenceEquals(t,"B")?System.Array.init([123,125],System.Char):System.Array.init([40,41],System.Char),n.charCodeAt(0)===o[0]&&n.charCodeAt(n.length-1|0)===o[1]&&(r=!0,n=n.substr(1,n.length-2|0))):r=!0,r&&n.match(System.Guid.valid)!=null&&(u=n.toLowerCase())),u!=null)return this.fromString(u),!0;if(i)throw new System.FormatException("input is not in a recognized format");return!1},format$1:function(n){var t=System.String.concat(System.UInt32.format(this._a>>>0,"x8"),System.UInt16.format(this._b&65535,"x4"),System.UInt16.format(this._c&65535,"x4"));t=System.String.concat(t,System.Array.init([this._d,this._e,this._f,this._g,this._h,this._i,this._j,this._k],System.Byte).map(System.Guid.makeBinary).join(""));t=System.Guid.split.exec(t).slice(1).join("-");switch(n){case"n":case"N":return t.replace(System.Guid.replace,"");case"b":case"B":return System.String.concat(String.fromCharCode(123),t,String.fromCharCode(125));case"p":case"P":return System.String.concat(String.fromCharCode(40),t,String.fromCharCode(41));default:return t}},fromString:function(n){var t,i;if(!System.String.isNullOrEmpty(n)){for(n=n.replace(System.Guid.replace,""),t=System.Array.init(8,0,System.Byte),this._a=System.UInt32.parse(n.substr(0,8),16)|0,this._b=Bridge.Int.sxs(System.UInt16.parse(n.substr(8,4),16)&65535),this._c=Bridge.Int.sxs(System.UInt16.parse(n.substr(12,4),16)&65535),i=8;i<16;i=i+1|0)t[i-8|0]=System.Byte.parse(n.substr(i*2|0,2),16);this._d=t[0];this._e=t[1];this._f=t[2];this._g=t[3];this._h=t[4];this._i=t[5];this._j=t[6];this._k=t[7]}},getHashCode:function(){return Bridge.addHash([1684632903,this._a,this._b,this._c,this._d,this._e,this._f,this._g,this._h,this._i,this._j,this._k])},$clone:function(){return this}});Bridge.define("System.Text.RegularExpressions.Regex",{statics:{_cacheSize:15,_defaultMatchTimeout:System.TimeSpan.fromMilliseconds(-1),getCacheSize:function(){return System.Text.RegularExpressions.Regex._cacheSize},setCacheSize:function(n){if(n<0)throw new System.ArgumentOutOfRangeException("value");System.Text.RegularExpressions.Regex._cacheSize=n},escape:function(n){if(n==null)throw new System.ArgumentNullException("str");return System.Text.RegularExpressions.RegexParser.escape(n)},unescape:function(n){if(n==null)throw new System.ArgumentNullException("str");return System.Text.RegularExpressions.RegexParser.unescape(n)},isMatch:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.isMatch$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},isMatch$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.isMatch$2(n,t,i,r.Regex._defaultMatchTimeout)},isMatch$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.isMatch(n)},match:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.match$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},match$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.match$2(n,t,i,r.Regex._defaultMatchTimeout)},match$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.match(n)},matches:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.matches$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},matches$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.matches$2(n,t,i,r.Regex._defaultMatchTimeout)},matches$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.matches(n)},replace:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.replace$2(n,t,i,r.RegexOptions.None,r.Regex._defaultMatchTimeout)},replace$1:function(n,t,i,r){var u=System.Text.RegularExpressions;return u.Regex.replace$2(n,t,i,r,u.Regex._defaultMatchTimeout)},replace$2:function(n,t,i,r,u){var f=new System.Text.RegularExpressions.Regex.$ctor3(t,r,u,!0);return f.replace(n,i)},replace$3:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.replace$5(n,t,i,r.RegexOptions.None,r.Regex._defaultMatchTimeout)},replace$4:function(n,t,i,r){var u=System.Text.RegularExpressions;return u.Regex.replace$5(n,t,i,r,u.Regex._defaultMatchTimeout)},replace$5:function(n,t,i,r,u){var f=new System.Text.RegularExpressions.Regex.$ctor3(t,r,u,!0);return f.replace$3(n,i)},split:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.split$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},split$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.split$2(n,t,i,r.Regex._defaultMatchTimeout)},split$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.split(n)}},_pattern:"",_matchTimeout:System.TimeSpan.fromMilliseconds(-1),_runner:null,_caps:null,_capsize:0,_capnames:null,_capslist:null,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(n){this.$ctor1(n,System.Text.RegularExpressions.RegexOptions.None)},$ctor1:function(n,t){this.$ctor2(n,t,System.TimeSpan.fromMilliseconds(-1))},$ctor2:function(n,t,i){this.$ctor3(n,t,i,!1)},$ctor3:function(n,t,i){var r,u,f;if(this.$initialize(),r=System.Text.RegularExpressions,n==null)throw new System.ArgumentNullException("pattern");if(t>10!=0)throw new System.ArgumentOutOfRangeException("options");if((t&r.RegexOptions.ECMAScript)!=0&&(t&~(r.RegexOptions.ECMAScript|r.RegexOptions.IgnoreCase|r.RegexOptions.Multiline|r.RegexOptions.CultureInvariant))!=0)throw new System.ArgumentOutOfRangeException("options");if(u=System.Text.RegularExpressions.RegexOptions.IgnoreCase|System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.Singleline|System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace|System.Text.RegularExpressions.RegexOptions.ExplicitCapture,(t|u)!==u)throw new System.NotSupportedException("Specified Regex options are not supported.");this._validateMatchTimeout(i);this._pattern=n;this._options=t;this._matchTimeout=i;this._runner=new r.RegexRunner(this);f=this._runner.parsePattern();this._capnames=f.sparseSettings.sparseSlotNameMap;this._capslist=f.sparseSettings.sparseSlotNameMap.keys;this._capsize=this._capslist.length},getMatchTimeout:function(){return this._matchTimeout},getOptions:function(){return this._options},getRightToLeft:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.RightToLeft)!=0},isMatch:function(n){if(n==null)throw new System.ArgumentNullException("input");var t=this.getRightToLeft()?n.length:0;return this.isMatch$1(n,t)},isMatch$1:function(n,t){if(n==null)throw new System.ArgumentNullException("input");var i=this._runner.run(!0,-1,n,0,n.length,t);return i==null},match:function(n){if(n==null)throw new System.ArgumentNullException("input");var t=this.getRightToLeft()?n.length:0;return this.match$1(n,t)},match$1:function(n,t){if(n==null)throw new System.ArgumentNullException("input");return this._runner.run(!1,-1,n,0,n.length,t)},match$2:function(n,t,i){if(n==null)throw new System.ArgumentNullException("input");var r=this.getRightToLeft()?t+i:t;return this._runner.run(!1,-1,n,t,i,r)},matches:function(n){if(n==null)throw new System.ArgumentNullException("input");var t=this.getRightToLeft()?n.length:0;return this.matches$1(n,t)},matches$1:function(n,t){if(n==null)throw new System.ArgumentNullException("input");return new System.Text.RegularExpressions.MatchCollection(this,n,0,n.length,t)},getGroupNames:function(){if(this._capslist==null){for(var i=System.Globalization.CultureInfo.invariantCulture,t=[],r=this._capsize,n=0;n=0&&n=0&&n"9"||i<"0")return-1;t*=10;t+=i-"0"}return t>=0&&t0)||!(t<=2147483646)))throw new System.ArgumentOutOfRangeException("matchTimeout");}});Bridge.define("System.Text.RegularExpressions.Capture",{_text:"",_index:0,_length:0,ctor:function(n,t,i){this.$initialize();this._text=n;this._index=t;this._length=i},getIndex:function(){return this._index},getLength:function(){return this._length},getValue:function(){return this._text.substr(this._index,this._length)},toString:function(){return this.getValue()},_getOriginalString:function(){return this._text},_getLeftSubstring:function(){return this._text.slice(0,_index)},_getRightSubstring:function(){return this._text.slice(this._index+this._length,this._text.length)}});Bridge.define("System.Text.RegularExpressions.CaptureCollection",{inherits:function(){return[System.Collections.ICollection]},config:{alias:["getEnumerator","System$Collections$IEnumerable$getEnumerator","getCount","System$Collections$ICollection$getCount"]},_group:null,_capcount:0,_captures:null,ctor:function(n){this.$initialize();this._group=n;this._capcount=n._capcount},getSyncRoot:function(){return this._group},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},getCount:function(){return this._capcount},get:function(n){if(n===this._capcount-1&&n>=0)return this._group;if(n>=this._capcount||n<0)throw new System.ArgumentOutOfRangeException("i");return this._ensureCapturesInited(),this._captures[n]},copyTo:function(n,t){if(n==null)throw new System.ArgumentNullException("array");if(n.length0&&(t[this._capcount-1]=this._group);this._captures=t}}});Bridge.define("System.Text.RegularExpressions.CaptureEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"]},_captureColl:null,_curindex:0,ctor:function(n){this.$initialize();this._curindex=-1;this._captureColl=n},moveNext:function(){var n=this._captureColl.getCount();return this._curindex>=n?!1:(this._curindex++,this._curindex=this._captureColl.getCount())throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this._captureColl.get(this._curindex)},reset:function(){this._curindex=-1}});Bridge.define("System.Text.RegularExpressions.Group",{inherits:function(){return[System.Text.RegularExpressions.Capture]},statics:{config:{init:function(){var n=new System.Text.RegularExpressions.Group("",[],0);this.getEmpty=function(){return n}}},synchronized:function(n){if(n==null)throw new System.ArgumentNullException("group");var t=n.getCaptures();return t.getCount()>0&&t.get(0),n}},_caps:null,_capcount:0,_capColl:null,ctor:function(n,t,i){this.$initialize();var r=System.Text.RegularExpressions,u=i===0?0:t[(i-1)*2],f=i===0?0:t[i*2-1];r.Capture.ctor.call(this,n,u,f);this._caps=t;this._capcount=i},getSuccess:function(){return this._capcount!==0},getCaptures:function(){return this._capColl==null&&(this._capColl=new System.Text.RegularExpressions.CaptureCollection(this)),this._capColl}});Bridge.define("System.Text.RegularExpressions.GroupCollection",{inherits:function(){return[System.Collections.ICollection]},config:{alias:["getEnumerator","System$Collections$IEnumerable$getEnumerator","getCount","System$Collections$ICollection$getCount"]},_match:null,_captureMap:null,_groups:null,ctor:function(n,t){this.$initialize();this._match=n;this._captureMap=t},getSyncRoot:function(){return this._match},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},getCount:function(){return this._match._matchcount.length},get:function(n){return this._getGroup(n)},getByName:function(n){if(this._match._regex==null)return System.Text.RegularExpressions.Group.getEmpty();var t=this._match._regex.groupNumberFromName(n);return this._getGroup(t)},copyTo:function(n,t){var r,f,u,i;if(n==null)throw new System.ArgumentNullException("array");if(r=this.getCount(),n.length=this._match._matchcount.length||n<0?System.Text.RegularExpressions.Group.getEmpty():this._getGroupImpl(n),t},_getGroupImpl:function(n){return n===0?this._match:(this._ensureGroupsInited(),this._groups[n])},_ensureGroupsInited:function(){var n,i,r,u,t;if(this._groups==null){for(n=[],n.length=this._match._matchcount.length,n.length>0&&(n[0]=this._match),t=0;t=n?!1:(this._curindex++,this._curindex=this._groupColl.getCount())throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this._groupColl.get(this._curindex)},reset:function(){this._curindex=-1}});Bridge.define("System.Text.RegularExpressions.Match",{inherits:function(){return[System.Text.RegularExpressions.Group]},statics:{config:{init:function(){var n=new System.Text.RegularExpressions.Match(null,1,"",0,0,0);this.getEmpty=function(){return n}}},synchronized:function(n){if(n==null)throw new System.ArgumentNullException("match");for(var i=n.getGroups(),u=i.getCount(),r,t=0;t0&&this._matches[n][this._matchcount[n]*2-1]!==-2},_addMatch:function(n,t,i){var r,e,f,u;if(this._matches[n]==null&&(this._matches[n]=new Array(2)),r=this._matchcount[n],r*2+2>this._matches[n].length){for(e=this._matches[n],f=new Array(r*8),u=0;ut.Length)throw new System.ArgumentOutOfRangeException("startat");this._regex=n;this._input=t;this._beginning=i;this._length=r;this._startat=u;this._prevlen=-1;this._matches=[]},getCount:function(){return this._done||this._getMatch(2147483647),this._matches.length},getSyncRoot:function(){return this},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},get:function(n){var t=this._getMatch(n);if(t==null)throw new System.ArgumentOutOfRangeException("i");return t},copyTo:function(n,t){var r,f,u,i;if(n==null)throw new System.ArgumentNullException("array");if(r=this.getCount(),n.lengthn)return this._matches[n];if(this._done)return null;var t;do{if(t=this._regex._runner.run(!1,this._prevLen,this._input,this._beginning,this._length,this._startat),!t.getSuccess())return this._done=!0,null;this._matches.push(t);this._prevLen=t._length;this._startat=t._textpos}while(this._matches.length<=n);return t}});Bridge.define("System.Text.RegularExpressions.MatchEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"]},_matchcoll:null,_match:null,_curindex:0,_done:!1,ctor:function(n){this.$initialize();this._matchcoll=n},moveNext:function(){return this._done?!1:(this._match=this._matchcoll._getMatch(this._curindex),this._curindex++,this._match==null)?(this._done=!0,!1):!0},getCurrent:function(){if(this._match==null)throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this._match},reset:function(){this._curindex=0;this._done=!1;this._match=null}});Bridge.define("System.Text.RegularExpressions.RegexOptions",{statics:{None:0,IgnoreCase:1,Multiline:2,ExplicitCapture:4,Compiled:8,Singleline:16,IgnorePatternWhitespace:32,RightToLeft:64,ECMAScript:256,CultureInvariant:512},$kind:"enum",$flags:!0});Bridge.define("System.Text.RegularExpressions.RegexRunner",{statics:{},_runregex:null,_netEngine:null,_runtext:"",_runtextpos:0,_runtextbeg:0,_runtextend:0,_runtextstart:0,_quick:!1,_prevlen:0,ctor:function(n){if(this.$initialize(),n==null)throw new System.ArgumentNullException("regex");this._runregex=n;var i=n.getOptions(),t=System.Text.RegularExpressions.RegexOptions,r=(i&t.IgnoreCase)===t.IgnoreCase,u=(i&t.Multiline)===t.Multiline,f=(i&t.Singleline)===t.Singleline,e=(i&t.IgnorePatternWhitespace)===t.IgnorePatternWhitespace,o=(i&t.ExplicitCapture)===t.ExplicitCapture,s=n._matchTimeout.getTotalMilliseconds();this._netEngine=new System.Text.RegularExpressions.RegexEngine(n._pattern,r,u,f,e,o,s)},run:function(n,t,i,r,u,f){var e,o,s,h;if(f<0||f>i.Length)throw new System.ArgumentOutOfRangeException("start","Start index cannot be less than 0 or greater than input length.");if(u<0||u>i.Length)throw new ArgumentOutOfRangeException("length","Length cannot be less than 0 or exceed input length.");if(this._runtext=i,this._runtextbeg=r,this._runtextend=r+u,this._runtextstart=f,this._quick=n,this._prevlen=t,this._runregex.getRightToLeft()?(e=this._runtextbeg,o=-1):(e=this._runtextend,o=1),this._prevlen===0){if(this._runtextstart===e)return System.Text.RegularExpressions.Match.getEmpty();this._runtextstart+=o}return s=this._netEngine.match(this._runtext,this._runtextstart),h=this._convertNetEngineResults(s),h},parsePattern:function(){return this._netEngine.parsePattern()},_convertNetEngineResults:function(n){var f,i,t,e,o,r,u,s;if(n.success&&this._quick)return null;if(!n.success)return System.Text.RegularExpressions.Match.getEmpty();for(f=this.parsePattern(),i=f.sparseSettings.isSparse?new System.Text.RegularExpressions.MatchSparse(this._runregex,f.sparseSettings.sparseSlotMap,n.groups.length,this._runtext,0,this._runtext.length,this._runtextstart):new System.Text.RegularExpressions.Match(this._runregex,n.groups.length,this._runtext,0,this._runtext.length,this._runtextstart),r=0;r=System.Text.RegularExpressions.RegexParser._E}},_caps:null,_capsize:0,_capnames:null,_pattern:"",_currentPos:0,_concatenation:null,_culture:null,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(n){this.$initialize();this._culture=n;this._caps={}},_noteCaptures:function(n,t,i){this._caps=n;this._capsize=t;this._capnames=i},_setPattern:function(n){n==null&&(n="");this._pattern=n||"";this._currentPos=0},_scanReplacement:function(){this._concatenation=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Concatenate,this._options);for(var n,t,i;;){if(n=this._charsRight(),n===0)break;for(t=this._textpos();n>0&&this._rightChar()!=="$";)this._moveRight(),n--;this._addConcatenate(t,this._textpos()-t);n>0&&this._moveRightGetChar()==="$"&&(i=this._scanDollar(),this._concatenation.addChild(i))}return this._concatenation},_addConcatenate:function(n,t){var i,r,u;t!==0&&(t>1?(r=this._pattern.slice(n,n+t),i=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Multi,this._options,r)):(u=this._pattern[n],i=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,u)),this._concatenation.addChild(i))},_useOptionE:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.ECMAScript)!=0},_makeException:function(n){return new System.ArgumentException("Incorrect pattern. "+n)},_scanDollar:function(){var o=214748364,n,f,i,e,h;if(this._charsRight()===0)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$");var t=this._rightChar(),r,s=this._textpos(),u=s;if(t==="{"&&this._charsRight()>1?(r=!0,this._moveRight(),t=this._rightChar()):r=!1,t>="0"&&t<="9"){if(!r&&this._useOptionE()){for(n=-1,i=t-"0",this._moveRight(),this._isCaptureSlot(i)&&(n=i,u=this._textpos());this._charsRight()>0&&(t=this._rightChar())>="0"&&t<="9";){if(f=t-"0",i>o||i===o&&f>7)throw this._makeException("Capture group is out of range.");i=i*10+f;this._moveRight();this._isCaptureSlot(i)&&(n=i,u=this._textpos())}if(this._textto(u),n>=0)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,n)}else if(n=this._scanDecimal(),(!r||this._charsRight()>0&&this._moveRightGetChar()==="}")&&this._isCaptureSlot(n))return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,n)}else if(r&&this._isWordChar(t)){if(e=this._scanCapname(),this._charsRight()>0&&this._moveRightGetChar()==="}"&&this._isCaptureName(e))return h=this._captureSlotFromName(e),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,h)}else if(!r){n=1;switch(t){case"$":return this._moveRight(),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$");case"&":n=0;break;case"`":n=System.Text.RegularExpressions.RegexReplacement.LeftPortion;break;case"'":n=System.Text.RegularExpressions.RegexReplacement.RightPortion;break;case"+":n=System.Text.RegularExpressions.RegexReplacement.LastGroup;break;case"_":n=System.Text.RegularExpressions.RegexReplacement.WholeString}if(n!==1)return this._moveRight(),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,n)}return this._textto(s),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$")},_scanDecimal:function(){for(var r=214748364,n=0,t,i;this._charsRight()>0;){if(t=this._rightChar(),t<"0"||t>"9")break;if(i=t-"0",this._moveRight(),n>r||n===r&&i>7)throw this._makeException("Capture group is out of range.");n*=10;n+=i}return n},_scanOctal:function(){var i,n,t;for(t=3,t>this._charsRight()&&(t=this._charsRight()),n=0;t>0&&(i=this._rightChar()-"0")<=7;t-=1)if(this._moveRight(),n*=8,n+=i,this._useOptionE()&&n>=32)break;return n&=255,String.fromCharCode(n)},_scanHex:function(n){var t,i;if(t=0,this._charsRight()>=n)for(;n>0&&(i=this._hexDigit(this._moveRightGetChar()))>=0;n-=1)t*=16,t+=i;if(n>0)throw this._makeException("Insufficient hexadecimal digits.");return t},_hexDigit:function(n){var t,i=n.charCodeAt(0);return(t=i-"0".charCodeAt(0))<=9?t:(t=i-"a".charCodeAt(0))<=5?t+10:(t=i-"A".charCodeAt(0))<=5?t+10:-1},_scanControl:function(){if(this._charsRight()<=0)throw this._makeException("Missing control character.");var t=this._moveRightGetChar(),n=t.charCodeAt(0);if(n>="a".charCodeAt(0)&&n<="z".charCodeAt(0)&&(n=n-("a".charCodeAt(0)-"A".charCodeAt(0))),(n=n-"@".charCodeAt(0))<" ".charCodeAt(0))return String.fromCharCode(n);throw this._makeException("Unrecognized control character.");},_scanCapname:function(){for(var n=this._textpos();this._charsRight()>0;)if(!this._isWordChar(this._moveRightGetChar())){this._moveLeft();break}return _pattern.slice(n,this._textpos())},_scanCharEscape:function(){var n=this._moveRightGetChar(),t;if(n>="0"&&n<="7")return this._moveLeft(),this._scanOctal();switch(n){case"x":return this._scanHex(2);case"u":return this._scanHex(4);case"a":return"\x07";case"b":return"\b";case"e":return"\x1b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\x0b";case"c":return this._scanControl();default:if(t=n==="8"||n==="9"||n==="_",t||!this._useOptionE()&&this._isWordChar(n))throw this._makeException("Unrecognized escape sequence \\"+n+".");return n}},_captureSlotFromName:function(n){return this._capnames[n]},_isCaptureSlot:function(n){return this._caps!=null?this._caps[n]!=null:n>=0&&n0?!0:!1}});Bridge.define("System.Text.RegularExpressions.RegexReplacement",{statics:{replace:function(n,t,i,r,u){var f,o,e,s,h,c,l;if(n==null)throw new System.ArgumentNullException("evaluator");if(r<-1)throw new System.ArgumentOutOfRangeException("count","Count cannot be less than -1.");if(u<0||u>i.length)throw new System.ArgumentOutOfRangeException("startat","Start index cannot be less than 0 or greater than input length.");if(r===0)return i;if(f=t.match$1(i,u),f.getSuccess()){if(o="",t.getRightToLeft()){c=[];e=i.length;do{if(s=f.getIndex(),h=f.getLength(),s+h!==e&&c.push(i.slice(s+h,e)),e=s,c.push(n(f)),--r==0)break;f=f.nextMatch()}while(f.getSuccess());for(o=new StringBuilder,e>0&&(o+=o.slice(0,e)),l=c.length-1;l>=0;l--)o+=c[l]}else{e=0;do{if(s=f.getIndex(),h=f.getLength(),s!==e&&(o+=i.slice(e,s)),e=s+h,o+=n(f),--r==0)break;f=f.nextMatch()}while(f.getSuccess());et.length)throw new System.ArgumentOutOfRangeException("startat","Start index cannot be less than 0 or greater than input length.");if(f=[],i===1)return f.push(t),f;if(--i,u=n.match$1(t,r),u.getSuccess())if(n.getRightToLeft()){for(o=t.length;;){for(s=u.getIndex(),c=u.getLength(),h=u.getGroups(),l=h.getCount(),f.push(t.slice(s+c,o)),o=s,e=1;e0&&(e.push(u.length),u.push(r),r="");f=o._m;i!=null&&f>=0&&(f=i[f]);e.push(-System.Text.RegularExpressions.RegexReplacement.Specials-1-f);break;default:throw new System.ArgumentException("Replacement error.");}}r.length>0&&(e.push(u.length),u.push(r));this._strings=u;this._rules=e},getPattern:function(){return _rep},replacement:function(n){return this._replacementImpl("",n)},replace:function(n,t,i,r){var u,e,f,o,s,h,c;if(i<-1)throw new System.ArgumentOutOfRangeException("count","Count cannot be less than -1.");if(r<0||r>t.length)throw new System.ArgumentOutOfRangeException("startat","Start index cannot be less than 0 or greater than input length.");if(i===0)return t;if(u=n.match$1(t,r),u.getSuccess()){if(e="",n.getRightToLeft()){h=[];f=t.length;do{if(o=u.getIndex(),s=u.getLength(),o+s!==f&&h.push(t.slice(o+s,f)),f=o,this._replacementImplRTL(h,u),--i==0)break;u=u.nextMatch()}while(u.getSuccess());for(f>0&&(e+=e.slice(0,f)),c=h.length-1;c>=0;c--)e+=h[c]}else{f=0;do{if(o=u.getIndex(),s=u.getLength(),o!==f&&(e+=t.slice(f,o)),f=o+s,e=this._replacementImpl(e,u),--i==0)break;u=u.nextMatch()}while(u.getSuccess());f=0)n+=this._strings[i];else if(i<-u)n+=t._groupToStringImpl(-u-1-i);else switch(-u-1-i){case System.Text.RegularExpressions.RegexReplacement.LeftPortion:n+=t._getLeftSubstring();break;case System.Text.RegularExpressions.RegexReplacement.RightPortion:n+=t._getRightSubstring();break;case System.Text.RegularExpressions.RegexReplacement.LastGroup:n+=t._lastGroupToStringImpl();break;case System.Text.RegularExpressions.RegexReplacement.WholeString:n+=t._getOriginalString()}return n},_replacementImplRTL:function(n,t){for(var u=System.Text.RegularExpressions.RegexReplacement.Specials,i,r=_rules.length-1;r>=0;r--)if(i=this._rules[r],i>=0)n.push(this._strings[i]);else if(i<-u)n.push(t._groupToStringImpl(-u-1-i));else switch(-u-1-i){case System.Text.RegularExpressions.RegexReplacement.LeftPortion:n.push(t._getLeftSubstring());break;case System.Text.RegularExpressions.RegexReplacement.RightPortion:n.push(t._getRightSubstring());break;case System.Text.RegularExpressions.RegexReplacement.LastGroup:n.push(t._lastGroupToStringImpl());break;case System.Text.RegularExpressions.RegexReplacement.WholeString:n.push(t._getOriginalString())}}});Bridge.define("System.Text.RegularExpressions.RegexEngine",{_pattern:"",_patternInfo:null,_text:"",_textStart:0,_timeoutMs:-1,_timeoutTime:-1,_settings:null,_branchType:{base:0,offset:1,lazy:2,greedy:3,or:4},_branchResultKind:{ok:1,endPass:2,nextPass:3,nextBranch:4},ctor:function(n,t,i,r,u,f,e){if(this.$initialize(),n==null)throw new System.ArgumentNullException("pattern");this._pattern=n;this._timeoutMs=e;this._settings={ignoreCase:t,multiline:i,singleline:r,ignoreWhitespace:u,explicitCapture:f}},match:function(n,t){var i;if(n==null)throw new System.ArgumentNullException("text");if(t!=null&&(t<0||t>n.length))throw new System.ArgumentOutOfRangeException("textStart","Start index cannot be less than 0 or greater than input length.");return(this._text=n,this._textStart=t,this._timeoutTime=this._timeoutMs>0?(new Date).getTime()+System.Convert.toInt32(this._timeoutMs+.5):-1,i=this.parsePattern(),i.shouldFail)?this._getEmptyMatch():(this._checkTimeout(),this._scanAndTransformResult(t,i.tokens,!1,null))},parsePattern:function(){if(this._patternInfo==null){var n=System.Text.RegularExpressions.RegexEngineParser,t=n.parsePattern(this._pattern,this._cloneSettings(this._settings));this._patternInfo=t}return this._patternInfo},_scanAndTransformResult:function(n,t,i,r){var u=this._scan(n,this._text.length,t,i,r);return this._collectScanResults(u,n)},_scan:function(n,t,i,r,u){var c=this._branchResultKind,f=[],e,h,o;if(f.grCaptureCache={},e=null,h=null,i.length===0)return o=new System.Text.RegularExpressions.RegexEngineState,o.capIndex=n,o.txtIndex=n,o.capLength=0,o;var l=r?this._branchType.base:this._branchType.offset,a=this._patternInfo.isContiguous?n:t,s=new System.Text.RegularExpressions.RegexEngineBranch(l,n,n,a);for(s.pushPass(0,i,this._cloneSettings(this._settings)),s.started=!0,s.state.txtIndex=n,f.push(s);f.length;){if(e=f[f.length-1],h=this._scanBranch(t,f,e),h===c.ok&&(u==null||e.state.capLength===u))return e.state;this._advanceToNextBranch(f,e);this._checkTimeout()}return null},_scanBranch:function(n,t,i){var r=this._branchResultKind,u,f;if(i.mustFail)return i.mustFail=!1,r.nextBranch;while(i.hasPass()){if(u=i.peekPass(),u.tokens==null||u.tokens.length===0)f=r.endPass;else{if(this._addAlternationBranches(t,i,u)===r.nextBranch)return r.nextBranch;f=this._scanPass(n,t,i,u)}switch(f){case r.nextBranch:return f;case r.nextPass:continue;case r.endPass:case r.ok:i.popPass();break;default:throw new System.InvalidOperationException("Unexpected branch result.");}}return r.ok},_scanPass:function(n,t,i,r){for(var f=this._branchResultKind,s=r.tokens.length,o,u,e;r.index1){for(r=0;rt.max&&n.pop();else if(n.pop(),!t.isNotFailing){i=n[n.length-1];this._advanceToNextBranch(n,i);return}}},_collectScanResults:function(n,t){var o=this._patternInfo.groups,a=this._text,l={},s,f,h={},r,e,i,u,c=this._getEmptyMatch();if(n!=null){for(s=n.groups,this._fillMatch(c,n.capIndex,n.capLength,t),u=0;u0&&(e=i.captures[i.captures.length-1],i.capIndex=e.capIndex,i.capLength=e.capLength,i.value=e.value,i.success=!0),l[r.name]=!0,i.descriptor=r,c.groups.push(i))}return c},_scanToken:function(n,t,i,r,u){var f=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,e=this._branchResultKind;switch(u.type){case f.group:case f.groupImnsx:case f.alternationGroup:return this._scanGroupToken(n,t,i,r,u);case f.groupImnsxMisc:return this._scanGroupImnsxToken(u.group.constructs,r.settings);case f.charGroup:return this._scanCharGroupToken(t,i,r,u,!1);case f.charNegativeGroup:return this._scanCharNegativeGroupToken(t,i,r,u,!1);case f.escChar:case f.escCharOctal:case f.escCharHex:case f.escCharUnicode:case f.escCharCtrl:return this._scanLiteral(n,t,i,r,u.data.ch);case f.escCharOther:case f.escCharClass:return this._scanEscapeToken(t,i,r,u);case f.escCharClassCategory:throw new System.NotSupportedException("Unicode Category constructions are not supported.");case f.escCharClassBlock:throw new System.NotSupportedException("Unicode Named block constructions are not supported.");case f.escCharClassDot:return this._scanDotToken(n,t,i,r);case f.escBackrefNumber:return this._scanBackrefNumberToken(n,t,i,r,u);case f.escBackrefName:return this._scanBackrefNameToken(n,t,i,r,u);case f.anchor:case f.escAnchor:return this._scanAnchorToken(n,t,i,r,u);case f.groupConstruct:case f.groupConstructName:case f.groupConstructImnsx:case f.groupConstructImnsxMisc:return e.ok;case f.alternationGroupCondition:case f.alternationGroupRefNameCondition:case f.alternationGroupRefNumberCondition:return this._scanAlternationConditionToken(n,t,i,r,u);case f.alternation:return e.endPass;case f.commentInline:case f.commentXMode:return e.ok;default:return this._scanLiteral(n,t,i,r,u.value)}},_scanGroupToken:function(n,t,i,r,u){var h=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,c=this._branchResultKind,o=i.state.txtIndex,l,f;if(r.onHold){if(u.type===h.group){var a=u.group.rawIndex,s=r.onHoldTextIndex,v=o-s,e=t.grCaptureCache[a];if(e==null&&(e={},t.grCaptureCache[a]=e),l=s.toString()+"_"+v.toString(),e[l]==null)e[l]=!0;else return c.nextBranch;u.group.constructs.emptyCapture||(u.group.isBalancing?i.state.logCaptureGroupBalancing(u.group,s):i.state.logCaptureGroup(u.group,s,v))}return r.onHold=!1,r.onHoldTextIndex=-1,c.ok}if(u.type===h.group||u.type===h.groupImnsx){if(f=u.group.constructs,this._scanGroupImnsxToken(f,r.settings),f.isPositiveLookahead||f.isNegativeLookahead||f.isPositiveLookbehind||f.isNegativeLookbehind)return this._scanLook(i,o,n,u);if(f.isNonbacktracking)return this._scanNonBacktracking(i,o,n,u)}return r.onHoldTextIndex=o,r.onHold=!0,i.pushPass(0,u.children,this._cloneSettings(r.settings)),c.nextPass},_scanGroupImnsxToken:function(n,t){var i=this._branchResultKind;return n.isIgnoreCase!=null&&(t.ignoreCase=n.isIgnoreCase),n.isMultiline!=null&&(t.multiline=n.isMultiline),n.isSingleLine!=null&&(t.singleline=n.isSingleLine),n.isIgnoreWhitespace!=null&&(t.ignoreWhitespace=n.isIgnoreWhitespace),n.isExplicitCapture!=null&&(t.explicitCapture=n.isExplicitCapture),i.ok},_scanAlternationConditionToken:function(n,t,i,r,u){var o=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,f=this._branchResultKind,c=u.children,l=i.state.txtIndex,e=f.nextBranch,s,h;return u.type===o.alternationGroupRefNameCondition||u.type===o.alternationGroupRefNumberCondition?(s=i.state.resolveBackref(u.data.packedSlotId),e=s!=null?f.ok:f.nextBranch):(h=this._scan(l,n,c,!0,null),this._combineScanResults(i,h)&&(e=f.ok)),e===f.nextBranch&&r.tokens.noAlternation&&(e=f.endPass),e},_scanLook:function(n,t,i,r){var u=r.group.constructs,e=this._branchResultKind,f=r.children,o,s,h=u.isPositiveLookahead||u.isNegativeLookahead,c=u.isPositiveLookbehind||u.isNegativeLookbehind;return h||c?(f=f.slice(1,f.length),o=u.isPositiveLookahead||u.isPositiveLookbehind,s=h?this._scanLookAhead(n,t,i,f):this._scanLookBehind(n,t,i,f),o===s?e.ok:e.nextBranch):null},_scanLookAhead:function(n,t,i,r){var u=this._scan(t,i,r,!0,null);return this._combineScanResults(n,u)},_scanLookBehind:function(n,t,i,r){for(var u=t,f,e;u>=0;){if(f=t-u,e=this._scan(u,i,r,!0,f),this._combineScanResults(n,e))return!0;--u}return!1},_scanNonBacktracking:function(n,t,i,r){var e=this._branchResultKind,u=r.children,f;return(u=u.slice(1,u.length),f=this._scan(t,i,u,!0,null),!f)?e.nextBranch:(n.state.logCapture(f.capLength),e.ok)},_scanLiteral:function(n,t,i,r,u){var e=this._branchResultKind,o=i.state.txtIndex,f;if(o+u.length>n)return e.nextBranch;if(r.settings.ignoreCase){for(f=0;fh)break;if(h<=v.m)return u||t.state.logCapture(1),f.ok}c==null&&i.settings.ignoreCase&&(c=e.toUpperCase(),e=e===c?e.toLowerCase():c,h=e.charCodeAt(0))}return f.nextBranch},_scanCharNegativeGroupToken:function(n,t,i,r,u){var f=this._branchResultKind,o=t.state.txtIndex,s=this._text[o],e;return s==null?f.nextBranch:(e=this._scanCharGroupToken(n,t,i,r,!0),e===f.ok)?f.nextBranch:(u||t.state.logCapture(1),f.ok)},_scanEscapeToken:function(n,t,i,r){return this._scanWithJsRegex(n,t,i,r)},_scanDotToken:function(n,t,i,r){var u=this._branchResultKind,f=i.state.txtIndex;if(r.settings.singleline){if(f0&&this._scanWithJsRegex2(f-1,"\\w")===e.ok,s=this._scanWithJsRegex2(f,"\\w")===e.ok,o===s==(u.value==="\\B"))return e.ok}else if(u.value==="^"){if(f===0||r.settings.multiline&&this._text[f-1]==="\n")return e.ok}else if(u.value==="$"){if(f===n||r.settings.multiline&&this._text[f]==="\n")return e.ok}else if(u.value==="\\A"){if(f===0)return e.ok}else if(u.value==="\\z"){if(f===n)return e.ok}else if(u.value==="\\Z"){if(f===n||f===n-1&&this._text[f]==="\n")return e.ok}else if(u.value==="\\G")return e.ok;return e.nextBranch},_cloneSettings:function(n){return{ignoreCase:n.ignoreCase,multiline:n.multiline,singleline:n.singleline,ignoreWhitespace:n.ignoreWhitespace,explicitCapture:n.explicitCapture}},_combineScanResults:function(n,t){if(t!=null){for(var u=n.state.groups,r=t.groups,f=r.length,i=0;i=this._timeoutTime)throw new System.RegexMatchTimeoutException(this._text,this._pattern,System.TimeSpan.fromMilliseconds(this._timeoutMs));}}});Bridge.define("System.Text.RegularExpressions.RegexEngineBranch",{type:0,value:0,min:0,max:0,isStarted:!1,isNotFailing:!1,state:null,ctor:function(n,t,i,r,u){this.$initialize();this.type=n;this.value=t;this.min=i;this.max=r;this.state=u!=null?u.clone():new System.Text.RegularExpressions.RegexEngineState},pushPass:function(n,t,i){var r=new System.Text.RegularExpressions.RegexEnginePass(n,t,i);this.state.passes.push(r)},peekPass:function(){return this.state.passes[this.state.passes.length-1]},popPass:function(){return this.state.passes.pop()},hasPass:function(){return this.state.passes.length>0},clone:function(){var n=new System.Text.RegularExpressions.RegexEngineBranch(this.type,this.value,this.min,this.max,this.state);return n.isNotFailing=this.isNotFailing,n}});Bridge.define("System.Text.RegularExpressions.RegexEngineState",{txtIndex:0,capIndex:null,capLength:0,passes:null,groups:null,ctor:function(){this.$initialize();this.passes=[];this.groups=[]},logCapture:function(n){this.capIndex==null&&(this.capIndex=this.txtIndex);this.txtIndex+=n;this.capLength+=n},logCaptureGroup:function(n,t,i){this.groups.push({rawIndex:n.rawIndex,slotId:n.packedSlotId,capIndex:t,capLength:i})},logCaptureGroupBalancing:function(n,t){for(var s=n.balancingSlotId,r=this.groups,i=r.length-1,u,f,e,o;i>=0;){if(r[i].slotId===s){u=r[i];f=i;break}--i}return u!=null&&f!=null?(r.splice(f,1),n.constructs.name1!=null&&(e=u.capIndex+u.capLength,o=t-e,this.logCaptureGroup(n,e,o)),!0):!1},resolveBackref:function(n){for(var i=this.groups,t=i.length-1;t>=0;){if(i[t].slotId===n)return i[t];--t}return null},clone:function(){var t=new System.Text.RegularExpressions.RegexEngineState,e,u;t.txtIndex=this.txtIndex;t.capIndex=this.capIndex;t.capLength=this.capLength;for(var o=t.passes,f=this.passes,r=f.length,i,n=0;n0&&!e.qtoken&&(a=t[o-1],a.type===s.literal&&!a.qtoken)){a.value+=e.value;a.length+=e.length;t.splice(o,1);--o;continue}}else if(e.type===s.alternationGroupCondition&&e.data!=null)if(e.data.number!=null){if(h=i.getPackedSlotIdBySlotNumber(e.data.number),h==null)throw new System.ArgumentException("Reference to undefined group number "+c+".");e.data.packedSlotId=h;l._updatePatternToken(e,s.alternationGroupRefNumberCondition,e.index,e.length,e.value)}else h=i.getPackedSlotIdBySlotName(e.data.name),h!=null?(e.data.packedSlotId=h,l._updatePatternToken(e,s.alternationGroupRefNameCondition,e.index,e.length,e.value)):delete e.data;e.children&&e.children.length&&(v=e.type===s.group?[e.group.rawIndex]:[],v=v.concat(u),y=e.localSettings||n,l._transformRawTokens(y,e.children,i,r,v,f+1),n.shouldFail=n.shouldFail||y.shouldFail,n.isContiguous=n.isContiguous||y.isContiguous);e.type===s.group&&r.push(e.group.packedSlotId)}},_fillGroupDescriptors:function(n,t){var f=System.Text.RegularExpressions.RegexEngineParser,i,r,u;for(f._fillGroupStructure(t,n,null),u=1,r=0;r1&&(i.isSparse=!0);i.lastSlot=t},_addSparseSlotForSameNamedGroups:function(n,t,i,r){var o=System.Text.RegularExpressions.RegexEngineParser,u,f,e;if(o._addSparseSlot(n[0],t,i,r),f=n[0].sparseSlotId,e=n[0].packedSlotId,n.length>1)for(u=1;u":t.isNonbacktracking=!0;break;case"?<=":t.isPositiveLookbehind=!0;break;case"?2)throw new System.ArgumentException("Invalid group name.");i[0].length&&(t.name1=i[0],h=o._validateGroupName(i[0]),t.isNumberName1=h.isNumberName);i.length===2&&(t.name2=i[1],c=o._validateGroupName(i[1]),t.isNumberName2=c.isNumberName)}else if(n.type===f.groupConstructImnsx||n.type===f.groupConstructImnsxMisc)for(var l=n.type===f.groupConstructImnsx?1:0,a=n.length-1-l,u=!0,r,e=1;e<=a;e++)r=n.value[e],r==="-"?u=!1:r==="i"?t.isIgnoreCase=u:r==="m"?t.isMultiline=u:r==="n"?t.isExplicitCapture=u:r==="s"?t.isSingleLine=u:r==="x"&&(t.isIgnoreWhitespace=u);return t},_validateGroupName:function(n){var t,i,r;if(!n||!n.length)throw new System.ArgumentException("Invalid group name: Group names must begin with a word character.");if(t=n[0]>="0"&&n[0]<="9",t&&(i=System.Text.RegularExpressions.RegexEngineParser,r=i._matchChars(n,0,n.length,i._decSymbols),r.matchLength!==n.length))throw new System.ArgumentException("Invalid group name: Group names must begin with a word character.");return{isNumberName:t}},_fillBalancingGroupInfo:function(n,t){for(var i,r=0;r=1&&i.getPackedSlotIdBySlotNumber(f)!=null)continue;if(f<=9)throw new System.ArgumentException("Reference to undefined group number "+f.toString()+".");if(e=u._parseOctalCharToken(r.value,0,r.length),e==null)throw new System.ArgumentException("Unrecognized escape sequence "+r.value.slice(0,2)+".");h=r.length-e.length;u._modifyPatternToken(r,n,s.escCharOctal,null,e.length);r.data=e.data;h>0&&(c=u._createPatternToken(n,s.literal,r.index+r.length,h),t.splice(o+1,0,c))}r.children&&r.children.length&&u._preTransformBackrefTokens(n,r.children,i)}},_updateGroupDescriptors:function(n,t){for(var o=System.Text.RegularExpressions.RegexEngineParser,e=o.tokenTypes,r,i,f,h,c,s=t||0,u=0;un.length)throw new System.ArgumentOutOfRangeException("startIndex");if(rn.length)throw new System.ArgumentOutOfRangeException("endIndex");for(var f=System.Text.RegularExpressions.RegexEngineParser,h=f.tokenTypes,s=[],o,e,u=i;u=0){++u;continue}o=e==="."?f._parseDotToken(n,u,r):e==="\\"?f._parseEscapeToken(n,u,r):e==="["?f._parseCharRangeToken(n,u,r):e==="^"||e==="$"?f._parseAnchorToken(n,u):e==="("?f._parseGroupToken(n,t,u,r):e==="|"?f._parseAlternationToken(n,u):e==="#"&&t.ignoreWhitespace?f._parseXModeCommentToken(n,u,r):f._parseQuantifierToken(n,u,r);o==null&&(o=f._createPatternToken(n,h.literal,u,1));o!=null&&(s.push(o),u+=o.length)}return s},_parseEscapeToken:function(n,t,i){var u=System.Text.RegularExpressions.RegexEngineParser,o=u.tokenTypes,f=n[t],h,c,l,s,y,e,a,r,v;if(f!=="\\")return null;if(t+1>=i)throw new System.ArgumentException("Illegal \\ at end of pattern.");if(f=n[t+1],f>="1"&&f<="9")return h=u._matchChars(n,t+1,i,u._decSymbols,3),c=u._createPatternToken(n,o.escBackrefNumber,t,1+h.matchLength),c.data={number:parseInt(h.match,10)},c;if(u._escapedAnchors.indexOf(f)>=0)return u._createPatternToken(n,o.escAnchor,t,2);if(l=u._parseEscapedChar(n,t,i),l!=null)return l;if(f==="k"){if(t+2":"'",e=u._matchUntil(n,t+3,i,y),e.unmatchLength===1&&e.matchLength>0)))return a=u._createPatternToken(n,o.escBackrefName,t,3+e.matchLength+1),a.data={name:e.match},a;throw new System.ArgumentException("Malformed \\k<...> named back reference.");}if(r=f.charCodeAt(0),r>=0&&r<48||r>57&&r<65||r>90&&r<95||r===96||r>122&&r<128)return v=u._createPatternToken(n,o.escChar,t,2),v.data={n:r,ch:f},v;throw new System.ArgumentException("Unrecognized escape sequence \\"+f+".");},_parseOctalCharToken:function(n,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,s=r.tokenTypes,u=n[t];if(u==="\\"&&t+1="0"&&u<="7")){var f=r._matchChars(n,t+1,i,r._octSymbols,3),e=parseInt(f.match,8),o=r._createPatternToken(n,s.escCharOctal,t,1+f.matchLength);return o.data={n:e,ch:String.fromCharCode(e)},o}return null},_parseEscapedChar:function(n,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,o=r.tokenTypes,f,u=n[t],a,v,h,c,y,p,e,s,l;if(u!=="\\"||t+1>=i)return null;if(u=n[t+1],r._escapedChars.indexOf(u)>=0){if(u==="x"){if(a=r._matchChars(n,t+2,i,r._hexSymbols,2),a.matchLength!==2)throw new System.ArgumentException("Insufficient hexadecimal digits.");return v=parseInt(a.match,16),f=r._createPatternToken(n,o.escCharHex,t,4),f.data={n:v,ch:String.fromCharCode(v)},f}if(u==="c"){if(t+2>=i)throw new System.ArgumentException("Missing control character.");if(h=n[t+2],h=h.toUpperCase(),c=this._controlChars.indexOf(h),c>=0)return f=r._createPatternToken(n,o.escCharCtrl,t,3),f.data={n:c,ch:String.fromCharCode(c)},f;throw new System.ArgumentException("Unrecognized control character.");}else if(u==="u"){if(y=r._matchChars(n,t+2,i,r._hexSymbols,4),y.matchLength!==4)throw new System.ArgumentException("Insufficient hexadecimal digits.");return p=parseInt(y.match,16),f=r._createPatternToken(n,o.escCharUnicode,t,6),f.data={n:p,ch:String.fromCharCode(p)},f}f=r._createPatternToken(n,o.escChar,t,2);switch(u){case"a":e=7;break;case"b":e=8;break;case"t":e=9;break;case"r":e=13;break;case"v":e=11;break;case"f":e=12;break;case"n":e=10;break;case"e":e=27;break;default:throw new System.ArgumentException("Unexpected escaped char: '"+u+"'.");}return f.data={n:e,ch:String.fromCharCode(e)},f}if(u>="0"&&u<="7")return r._parseOctalCharToken(n,t,i);if(r._escapedCharClasses.indexOf(u)>=0){if(u==="p"||u==="P"){if(s=r._matchUntil(n,t+2,i,"}"),s.matchLength<2||s.match[0]!=="{"||s.unmatchLength!==1)throw new System.ArgumentException("Incomplete p{X} character escape.");if(l=s.match.slice(1),r._unicodeCategories.indexOf(l)>=0)return r._createPatternToken(n,o.escCharClassCategory,t,2+s.matchLength+1);if(r._namedCharBlocks.indexOf(l)>=0)return r._createPatternToken(n,o.escCharClassBlock,t,2+s.matchLength+1);throw new System.ArgumentException("Unknown property '"+l+"'.");}return r._createPatternToken(n,o.escCharClass,t,2)}return r._escapedSpecialSymbols.indexOf(u)>=0?(f=r._createPatternToken(n,o.escCharOther,t,2),f.data={n:u.charCodeAt(0),ch:u},f):null},_parseCharRangeToken:function(n,t,i){var e=System.Text.RegularExpressions.RegexEngineParser,a=e.tokenTypes,u=[],v,o,f,y=!1,p=!1,w=!1,s=n[t],r,h,c,b,l,k;if(s!=="[")return null;for(r=t+1,h=-1,rb){h=r;break}else f=e._createPatternToken(n,a.literal,r,1),c=1;if(p)throw new System.ArgumentException("A subtraction must be the last element in a character class.");u.length>1&&(v=e._parseCharIntervalToken(n,u[u.length-2],u[u.length-1],f),v!=null&&(u.pop(),u.pop(),f=v));f!=null&&(u.push(f),r+=c)}if(h<0||u.length<1)throw new System.ArgumentException("Unterminated [] set.");return l=y?e._createPatternToken(n,a.charNegativeGroup,t,1+h-t,u,"[^","]"):e._createPatternToken(n,a.charGroup,t,1+h-t,u,"[","]"),k=e._tidyCharRange(u),l.data={ranges:k},o!=null&&(l.data.substractToken=o),l},_parseCharIntervalToken:function(n,t,i,r){var h=System.Text.RegularExpressions.RegexEngineParser,u=h.tokenTypes,f,o,e,s;if(i.type!==u.literal||i.value!=="-"||t.type!==u.literal&&t.type!==u.escChar&&t.type!==u.escCharOctal&&t.type!==u.escCharHex&&t.type!==u.escCharCtrl&&t.type!==u.escCharUnicode&&t.type!==u.escCharOther||r.type!==u.literal&&r.type!==u.escChar&&r.type!==u.escCharOctal&&r.type!==u.escCharHex&&r.type!==u.escCharCtrl&&r.type!==u.escCharUnicode&&r.type!==u.escCharOther)return null;if(t.type===u.literal?(f=t.value.charCodeAt(0),o=t.value):(f=t.data.n,o=t.data.ch),r.type===u.literal?(e=r.value.charCodeAt(0),s=r.value):(e=r.data.n,s=r.data.ch),f>e)throw new System.NotSupportedException("[x-y] range in reverse order.");var l=t.index,a=t.length+i.length+r.length,c=h._createPatternToken(n,u.charInterval,l,a,[t,i,r],"","");return c.data={startN:f,startCh:o,endN:e,endCh:s},c},_tidyCharRange:function(n){for(var l=System.Text.RegularExpressions.RegexEngineParser,i=l.tokenTypes,f,e,o,t,r=[],a=[],s,h,c,v,u=0;ue)break;r.splice(f,0,{n:e,m:o})}for(u=0;u1+s.m)break;c++;h.m>s.m&&(s.m=h.m)}c>0&&r.splice(u+1,c)}return a.length>0&&(v="["+l._constructPattern(a)+"]",r.charClassToken=l._createPatternToken(v,i.charGroup,0,v.length,n,"[","]")),r},_parseDotToken:function(n,t){var i=System.Text.RegularExpressions.RegexEngineParser,r=i.tokenTypes,u=n[t];return u!=="."?null:i._createPatternToken(n,r.escCharClassDot,t,1)},_parseAnchorToken:function(n,t){var i=System.Text.RegularExpressions.RegexEngineParser,u=i.tokenTypes,r=n[t];return r!=="^"&&r!=="$"?null:i._createPatternToken(n,u.anchor,t,1)},_updateSettingsFromConstructs:function(n,t){t.isIgnoreWhitespace!=null&&(n.ignoreWhitespace=t.isIgnoreWhitespace);t.isExplicitCapture!=null&&(n.explicitCapture=t.isExplicitCapture)},_parseGroupToken:function(n,t,i,r){var s=System.Text.RegularExpressions.RegexEngineParser,u=s.tokenTypes,a={ignoreWhitespace:t.ignoreWhitespace,explicitCapture:t.explicitCapture},e=n[i],h,c,l,ft,et,p,w,ot,b,nt;if(e!=="(")return null;var k=1,y=!1,d=i+1,o=-1,g=!1,tt=!1,it=!1,rt=!1,ut=!1,v=null,f=s._parseGroupConstructToken(n,a,i+1,r);for(f!=null&&(v=this._fillGroupConstructs(f),d+=f.length,f.type===u.commentInline?g=!0:f.type===u.alternationGroupCondition?tt=!0:f.type===u.groupConstructImnsx?(this._updateSettingsFromConstructs(a,v),rt=!0):f.type===u.groupConstructImnsxMisc&&(this._updateSettingsFromConstructs(t,v),it=!0)),a.explicitCapture&&(v==null||v.name1==null)&&(ut=!0),h=d;h1))throw new System.ArgumentException("Too many | in (?()|).");if(w===0)throw new System.NotSupportedException("Alternation group without | is not supported.");ot=s._createPatternToken(n,u.alternationGroup,i,1+o-i,l,"(",")");c=ot}else b=u.group,it?b=u.groupImnsxMisc:rt&&(b=u.groupImnsx),nt=s._createPatternToken(n,b,i,1+o-i,l,"(",")"),nt.localSettings=a,c=nt}return ut&&(c.isNonCapturingExplicit=!0),c},_parseGroupConstructToken:function(n,t,i,r){var f=System.Text.RegularExpressions.RegexEngineParser,o=f.tokenTypes,u=n[i],h,c,s,l,e,a,v;if(u!=="?"||i+1>=r)return null;if(u=n[i+1],u===":"||u==="="||u==="!"||u===">")return f._createPatternToken(n,o.groupConstruct,i,2);if(u==="#")return f._createPatternToken(n,o.commentInline,i,2);if(u==="(")return f._parseAlternationGroupConditionToken(n,t,i,r);if(u==="<"&&i+2":u,s=f._matchUntil(n,i+2,r,c),s.unmatchLength!==1||s.matchLength===0)throw new System.ArgumentException("Unrecognized grouping construct.");if(l=s.match.slice(0,1),"`~@#$%^&*()+{}[]|\\/|'\";:,.?".indexOf(l)>=0)throw new System.ArgumentException("Invalid group name: Group names must begin with a word character.");return f._createPatternToken(n,o.groupConstructName,i,2+s.matchLength+1)}if(e=f._matchChars(n,i+1,r,"imnsx-"),e.matchLength>0&&(e.unmatchCh===":"||e.unmatchCh===")"))return a=e.unmatchCh===":"?o.groupConstructImnsx:o.groupConstructImnsxMisc,v=e.unmatchCh===":"?1:0,f._createPatternToken(n,a,i,1+e.matchLength+v);throw new System.ArgumentException("Unrecognized grouping construct.");},_parseQuantifierToken:function(n,t,i){var f=System.Text.RegularExpressions.RegexEngineParser,s=f.tokenTypes,r=null,e=n[t],u,o,h,c;if(e==="*"||e==="+"||e==="?")r=f._createPatternToken(n,s.quantifier,t,1),r.data={val:e};else if(e==="{"&&(u=f._matchChars(n,t+1,i,f._decSymbols),u.matchLength!==0))if(u.unmatchCh==="}")r=f._createPatternToken(n,s.quantifierN,t,1+u.matchLength+1),r.data={n:parseInt(u.match,10)};else if(u.unmatchCh===","&&(o=f._matchChars(n,u.unmatchIndex+1,i,f._decSymbols),o.unmatchCh==="}"&&(r=f._createPatternToken(n,s.quantifierNM,t,1+u.matchLength+1+o.matchLength+1),r.data={n:parseInt(u.match,10),m:null},o.matchLength!==0&&(r.data.m=parseInt(o.match,10),r.data.n>r.data.m))))throw new System.ArgumentException("Illegal {x,y} with x > y.");return r!=null&&(h=t+r.length,h=r||n[i+1]!=="("||(f=s._parseGroupToken(n,t,i+1,r),f==null))return null;if(f.type===u.commentInline)throw new System.ArgumentException("Alternation conditions cannot be comments.");if(e=f.children,e&&e.length){if(h=e[0],h.type===u.groupConstructName)throw new System.ArgumentException("Alternation conditions do not capture and cannot be named.");if((h.type===u.groupConstruct||h.type===u.groupConstructImnsx)&&(l=s._findFirstGroupWithoutConstructs(e),l!=null&&(l.isEmptyCapturing=!0)),h.type===u.literal)if(o=f.value.slice(1,f.value.length-1),v=o[0]>="0"&&o[0]<="9",v){if(y=s._matchChars(o,0,o.length,s._decSymbols),y.matchLength!==o.length)throw new System.ArgumentException("Malformed Alternation group number: "+o+".");p=parseInt(o,10);c={number:p}}else c={name:o}}return e.length&&(e[0].type===u.groupConstruct||e[0].type===u.groupConstructImnsx)||(h=s._createPatternToken("?:",u.groupConstruct,0,2),e.splice(0,0,h)),a=s._createPatternToken(n,u.alternationGroupCondition,f.index-1,1+f.length,[f],"?",""),c!=null&&(a.data=c),a},_findFirstGroupWithoutConstructs:function(n){for(var f=System.Text.RegularExpressions.RegexEngineParser,u=f.tokenTypes,i=null,t,r=0;r0&&(o.children=u,o.childrenPrefix=f,o.childrenPostfix=e),o},_modifyPatternToken:function(n,t,i,r,u){i!=null&&(n.type=i);(r!=null||u!=null)&&(r!=null&&(n.index=r),u!=null&&(n.length=u),n.value=t.slice(n.index,n.index+n.length))},_updatePatternToken:function(n,t,i,r,u){n.type=t;n.index=i;n.length=r;n.value=u},_matchChars:function(n,t,i,r,u){var f={match:"",matchIndex:-1,matchLength:0,unmatchCh:"",unmatchIndex:-1,unmatchLength:0},e=t,o;for(u!=null&&u>=0&&(i=t+u);et&&(f.match=n.slice(t,e),f.matchIndex=t,f.matchLength=e-t),f},_matchUntil:function(n,t,i,r,u){var f={match:"",matchIndex:-1,matchLength:0,unmatchCh:"",unmatchIndex:-1,unmatchLength:0},e=t,o;for(u!=null&&u>=0&&(i=t+u);e=0){f.unmatchCh=o;f.unmatchIndex=e;f.unmatchLength=1;break}e++}return e>t&&(f.match=n.slice(t,e),f.matchIndex=t,f.matchLength=e-t),f}}});Bridge.define("System.Random",{statics:{MBIG:2147483647,MSEED:161803398,MZ:0},inext:0,inextp:0,seedArray:null,config:{init:function(){this.seedArray=System.Array.init(56,0,System.Int32)}},ctor:function(){System.Random.$ctor1.call(this,System.Int64.clip32(System.Int64((new Date).getTime()).mul(1e4)))},$ctor1:function(n){var e,u,i,o,r,f,t;for(this.$initialize(),o=n===-2147483648?2147483647:Math.abs(n),u=System.Random.MSEED-o|0,this.seedArray[55]=u,i=1,r=1;r<55;r=r+1|0)e=(21*r|0)%55,this.seedArray[e]=i,i=u-i|0,i<0&&(i=i+System.Random.MBIG|0),u=this.seedArray[e];for(f=1;f<5;f=f+1|0)for(t=1;t<56;t=t+1|0)this.seedArray[t]=this.seedArray[t]-this.seedArray[1+(t+30|0)%55|0]|0,this.seedArray[t]<0&&(this.seedArray[t]=this.seedArray[t]+System.Random.MBIG|0);this.inext=0;this.inextp=21;n=1},sample:function(){return this.internalSample()*46566128752457969e-26},internalSample:function(){var n,t=this.inext,i=this.inextp;return(t=t+1|0)>=56&&(t=1),(i=i+1|0)>=56&&(i=1),n=this.seedArray[t]-this.seedArray[i]|0,n===System.Random.MBIG&&(n=n-1|0),n<0&&(n=n+System.Random.MBIG|0),this.seedArray[t]=n,this.inext=t,this.inextp=i,n},next:function(){return this.internalSample()},next$2:function(n,t){if(n>t)throw new System.ArgumentOutOfRangeException("minValue","'minValue' cannot be greater than maxValue.");var i=System.Int64(t).sub(System.Int64(n));return i.lte(System.Int64(2147483647))?Bridge.Int.clip32(this.sample()*System.Int64.toNumber(i))+n|0:System.Int64.clip32(Bridge.Int.clip64(this.getSampleForLargeRange()*System.Int64.toNumber(i)).add(System.Int64(n)))},next$1:function(n){if(n<0)throw new System.ArgumentOutOfRangeException("maxValue","'maxValue' must be greater than zero.");return Bridge.Int.clip32(this.sample()*n)},getSampleForLargeRange:function(){var n=this.internalSample(),i=this.internalSample()%2==0?!0:!1,t;return i&&(n=-n|0),t=n,t+=2147483646,t/4294967293},nextDouble:function(){return this.sample()},nextBytes:function(n){if(n==null)throw new System.ArgumentNullException("buffer");for(var t=0;t +var GanttChartView = DlhSoft.Controls.GanttChartView; +// Query string syntax: ?theme +// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero. +var queryString = window.location.search; +var theme = queryString ? queryString.substr(1) : null; +// Retrieve and store the control element for reference purposes. +var ganttChartViewElement = document.querySelector('#ganttChartView'); +// Prepare data items. +var date = new Date(), year = date.getFullYear(), month = date.getMonth(); +var items = [ + { content: 'Task 1', isExpanded: false, start: new Date() }, + { content: 'Task 1.1', indentation: 1, start: new Date(year, month, 2, 8, 0, 0), finish: new Date(year, month, 4, 16, 0, 0) }, + { content: 'Task 1.2', indentation: 1, start: new Date(year, month, 3, 8, 0, 0), finish: new Date(year, month, 5, 12, 0, 0) }, + { content: 'Task 2', isExpanded: true, start: new Date() }, + { content: 'Task 2.1', indentation: 1, start: new Date(year, month, 2, 8, 0, 0), finish: new Date(year, month, 8, 16, 0, 0), completedFinish: new Date(year, month, 5, 16, 0, 0), assignmentsContent: 'Resource 1, Resource 2 [50%]' }, + { content: 'Task 2.2', indentation: 1, start: new Date() }, + { content: 'Task 2.2.1', indentation: 2, start: new Date(year, month, 11, 8, 0, 0), finish: new Date(year, month, 14, 16, 0, 0), completedFinish: new Date(year, month, 14, 16, 0, 0), assignmentsContent: 'Resource 2' }, + { content: 'Task 2.2.2', indentation: 2, start: new Date(year, month, 12, 12, 0, 0), finish: new Date(year, month, 14, 16, 0, 0), assignmentsContent: 'Resource 2' }, + { content: 'Task 3', indentation: 1, start: new Date(year, month, 15, 16, 0, 0), isMilestone: true }]; +items[3].predecessors = [{ item: items[0], dependencyType: 'SS' }]; +items[7].predecessors = [{ item: items[6], lag: 2 * 60 * 60 * 1000 }]; +items[8].predecessors = [{ item: items[4] }, { item: items[5] }]; +for (var i = 4; i <= 16; i++) + items.push({ content: 'Task ' + i, indentation: i >= 8 && i % 3 == 2 ? 0 : 1, start: new Date(year, month, 2 + (i <= 8 ? (i - 4) * 3 : i - 8), 8, 0, 0), finish: new Date(year, month, 2 + (i <= 8 ? (i - 4) * 3 + (i > 8 ? 6 : 1) : i - 2), 16, 0, 0) }); +var settings = { currentTime: new Date(year, month, 2, 12, 0, 0) }; +// Set up colors. +items[0].backgroundColor = 'blue'; +items[3].backgroundColor = 'yellow'; +items[5].backgroundColor = 'green'; +for (var i = 13; i <= 19; i += 3) + items[i].backgroundColor = i % 2 == 0 ? 'orange' : 'brown'; +// Optionally, initialize custom theme and templates (themes.js, templates.js). +initializeGanttChartTheme(settings, theme); +initializeGanttChartTemplates(settings, theme); +// Set up summary template to provide background color rectangles. +var originalSummaryTaskTemplate = settings.summaryTaskTemplate ? settings.summaryTaskTemplate : DlhSoft.Controls.GanttChartView.getDefaultSummaryTaskTemplate(items, ganttChartView, settings); +settings.summaryTaskTemplate = function (item) { + var svgns = 'http://www.w3.org/2000/svg'; + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var document = ganttChartView.ownerDocument; + var group = originalSummaryTaskTemplate(item); + var itemLeft = ganttChartView.getChartPosition(item.start); + var itemRight = ganttChartView.getChartPosition(item.finish); + if (item.backgroundColor) { + var background = document.createElementNS(svgns, 'rect'); + background.setAttribute('x', itemLeft - 10); + background.setAttribute('y', 0); + background.setAttribute('width', 10 + Math.max(0, itemRight - itemLeft - 1) + 10); + background.setAttribute('height', getVisibleItemCount(item) * settings.itemHeight); + background.setAttribute('fill', item.backgroundColor); + background.setAttribute('opacity', 0.1); + group.insertBefore(background, group.firstChild); + } + return group; +}; +function getVisibleItemCount(summaryItem) { + var count = 1; + summaryItem.children + .filter(function(item) { return item.isVisible }) + .forEach(function(item) { + if (!item.hasChildren) { count++; } + else { count += getVisibleItemCount(item); } + }); + return count; +} +// Initialize the component. +var ganttChartView = DlhSoft.Controls.GanttChartView.initialize(ganttChartViewElement, items, settings); \ No newline at end of file diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/index.html b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/index.html new file mode 100644 index 000000000..5e296c511 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/index.html @@ -0,0 +1,16 @@ + + + + GanttChartView Work Optimizations Sample + + + + + + + + + +
...
+ + diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/templates.js new file mode 100644 index 000000000..8c6a87b2d --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/templates.js @@ -0,0 +1,643 @@ +// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero. +function initializeGanttChartTemplates(settings, theme) { + if (theme == 'Default' || theme == 'Aero') + return; + // Override settings (partial). + var barMargin = 4; + var barHeight = settings.itemHeight - 2 * barMargin; + var completedBarMargin = 1; + var completedBarHeight = barHeight - 2 * completedBarMargin; + // Common helpers. + var undefinedType = 'undefined', svgns = 'http://www.w3.org/2000/svg', hourDuration = 60 * 60 * 1000; + function getChartItemArea(item) { + var document = item.ganttChartView.ownerDocument; + if (typeof item.chartItemArea === undefinedType) + item.chartItemArea = document.createElementNS(svgns, 'g'); + for (var i = item.chartItemArea.childNodes.length; i-- > 0;) + item.chartItemArea.removeChild(item.chartItemArea.childNodes[i]); + return item.chartItemArea; + } + function getTextNode(document, value) { + var span = document.createElement('span'); + span.innerHTML = value; + return span; + }; + function getDependencyTypeString(dependencyType) { + switch (dependencyType) { + case 'StartStart': + case 'SS': + return 'SS'; + case 'FinishFinish': + case 'FF': + return 'FF'; + case 'StartFinish': + case 'SF': + return 'SF'; + case 'FinishStart': + case 'FS': + default: + return 'FS'; + } + }; + // Template definitions. + settings.styleDefinitionTemplate = function (ganttChartView) { + var document = ganttChartView.ownerDocument; + var defs = document.createElementNS(svgns, 'defs'); + var arrowMarker = document.createElementNS(svgns, 'marker'); + arrowMarker.setAttribute('id', 'ArrowMarker'); + arrowMarker.setAttribute('viewBox', '0 0 9 9'); + arrowMarker.setAttribute('refX', '0'); + arrowMarker.setAttribute('refY', '4.5'); + arrowMarker.setAttribute('markerUnits', 'strokeWidth'); + arrowMarker.setAttribute('markerWidth', 4.5 * (settings.arrowSize ? settings.arrowSize : 1)); + arrowMarker.setAttribute('markerHeight', 3.5 * (settings.arrowSize ? settings.arrowSize : 1)); + arrowMarker.setAttribute('orient', 'auto'); + var arrowPath = document.createElementNS(svgns, 'path'); + arrowPath.setAttribute('fill', settings.arrowFill ? settings.arrowFill : '#3b87d9'); + arrowPath.setAttribute('d', 'M 0 0 L 9 4.5 L 0 9 z'); + arrowMarker.appendChild(arrowPath); + defs.appendChild(arrowMarker); + return defs; + }; + settings.standardTaskTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + var group = getChartItemArea(item); + if (settings.isBaselineVisible && typeof item.baselineStart !== undefinedType && typeof item.baselineFinish !== undefinedType) { + var itemBaselineLeft = ganttChartView.getChartPosition(item.baselineStart); + var itemBaselineRight = Math.max(ganttChartView.getChartPosition(item.baselineFinish), itemBaselineLeft + 4); + var baselineBar = document.createElementNS(svgns, 'rect'); + baselineBar.setAttribute('x', itemBaselineLeft); + baselineBar.setAttribute('y', barMargin / 2); + baselineBar.setAttribute('width', Math.max(0, itemBaselineRight - itemBaselineLeft - 1)); + baselineBar.setAttribute('height', barHeight); + baselineBar.setAttribute('rx', settings.barCornerRadius); + baselineBar.setAttribute('ry', settings.barCornerRadius); + var baselineBarClass = settings.baselineBarClass; + if (typeof item.baselineBarClass !== undefinedType) + baselineBarClass = item.baselineBarClass; + if (typeof baselineBarClass !== undefinedType) + baselineBar.setAttribute('class', baselineBarClass); + else { + var baselineBarStyle = settings.baselineBarStyle; + if (typeof item.baselineBarStyle !== undefinedType) + baselineBarStyle = item.baselineBarStyle; + if (typeof baselineBarStyle !== undefinedType) + baselineBar.setAttribute('style', baselineBarStyle); + } + group.appendChild(baselineBar); + } + var itemLeft = ganttChartView.getChartPosition(item.start); + var itemRight = Math.max(ganttChartView.getChartPosition(item.finish), itemLeft + 4); + var itemCompletedRight = ganttChartView.getChartPosition(item.completedFinish) + 1; + var bar = document.createElementNS(svgns, 'rect'); + bar.setAttribute('x', itemLeft); + bar.setAttribute('y', barMargin); + bar.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + bar.setAttribute('height', barHeight); + bar.setAttribute('rx', settings.barCornerRadius); + bar.setAttribute('ry', settings.barCornerRadius); + var barClass = settings.standardBarClass; + if (typeof item.standardBarClass !== undefinedType) + barClass = item.standardBarClass; + if (typeof item.barClass !== undefinedType) + barClass = item.barClass; + if (typeof barClass !== undefinedType) + bar.setAttribute('class', barClass); + else { + var barStyle = settings.standardBarStyle; + if (typeof item.standardBarStyle !== undefinedType) + barStyle = item.standardBarStyle; + if (typeof item.barStyle !== undefinedType) + barStyle = item.barStyle; + if (typeof barStyle !== undefinedType) + bar.setAttribute('style', barStyle); + } + group.appendChild(bar); + if (settings.isTaskCompletedEffortVisible) { + var completedBar = document.createElementNS(svgns, 'rect'); + completedBar.setAttribute('x', itemLeft + 1); + completedBar.setAttribute('y', barMargin + completedBarMargin); + completedBar.setAttribute('width', Math.max(0, itemCompletedRight - 2 - 1 - itemLeft - 1)); + completedBar.setAttribute('height', completedBarHeight); + completedBar.setAttribute('rx', settings.completedBarCornerRadius); + completedBar.setAttribute('ry', settings.completedBarCornerRadius); + var completedBarClass = settings.standardCompletedBarClass; + if (typeof item.standardCompletedBarClass !== undefinedType) + completedBarClass = item.standardCompletedBarClass; + if (typeof item.completedBarClass !== undefinedType) + completedBarClass = item.completedBarClass; + if (typeof completedBarClass !== undefinedType) + completedBar.setAttribute('class', completedBarClass); + else { + var completedBarStyle = settings.standardCompletedBarStyle; + if (typeof item.standardCompletedBarStyle !== undefinedType) + completedBarStyle = item.standardCompletedBarStyle; + if (typeof item.completedBarStyle !== undefinedType) + completedBarStyle = item.completedBarStyle; + if (typeof completedBarStyle !== undefinedType) + completedBar.setAttribute('style', completedBarStyle); + } + group.appendChild(completedBar); + } + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + var thumb = document.createElementNS(svgns, 'rect'); + thumb.setAttribute('x', itemLeft); + thumb.setAttribute('y', barMargin); + thumb.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + thumb.setAttribute('height', barHeight); + thumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + if (!settings.isTaskStartReadOnly) + group.appendChild(thumb); + var startThumb = document.createElementNS(svgns, 'rect'); + startThumb.setAttribute('x', itemLeft - 4); + startThumb.setAttribute('y', barMargin); + startThumb.setAttribute('width', 4); + startThumb.setAttribute('height', barHeight); + startThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: w-resize'); + if (settings.isDraggingTaskStartEndsEnabled && !settings.isTaskStartReadOnly && settings.interaction != 'TouchEnabled') + group.appendChild(startThumb); + var finishThumb = document.createElementNS(svgns, 'rect'); + finishThumb.setAttribute('x', itemRight - 4); + finishThumb.setAttribute('y', barMargin); + finishThumb.setAttribute('width', 8); + finishThumb.setAttribute('height', barHeight); + finishThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: e-resize'); + if (!settings.isTaskEffortReadOnly && settings.interaction != 'TouchEnabled') + group.appendChild(finishThumb); + var completedFinishThumb = document.createElementNS(svgns, 'rect'); + completedFinishThumb.setAttribute('x', itemCompletedRight - 2); + completedFinishThumb.setAttribute('y', barMargin); + completedFinishThumb.setAttribute('width', 6); + completedFinishThumb.setAttribute('height', barHeight); + completedFinishThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: ew-resize'); + if (!settings.isTaskCompletionReadOnly && settings.isTaskCompletedEffortVisible && settings.interaction != 'TouchEnabled') { + group.appendChild(completedFinishThumb); + var completedFinishToolTip = document.createElementNS(svgns, 'title'); + var completion = typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified ? ganttChartView.getItemCompletion(item) : NaN; + completedFinishToolTip.appendChild(getTextNode(document, !isNaN(completion) ? (Math.round(completion * 100 * 100) / 100) + '%' : '')); + completedFinishThumb.appendChild(completedFinishToolTip); + } + ganttChartView.initializeTaskDraggingThumbs(thumb, startThumb, finishThumb, completedFinishThumb, item, itemLeft, itemRight, itemCompletedRight); + if (settings.areTaskDependenciesVisible && !settings.areTaskPredecessorsReadOnly && !item.isPart) { + var startDependencyThumb = null; + if (typeof settings.allowCreatingStartDependencies === undefinedType || settings.allowCreatingStartDependencies) { + startDependencyThumb = document.createElementNS(svgns, 'circle'); + startDependencyThumb.setAttribute('cx', itemLeft); + startDependencyThumb.setAttribute('cy', barMargin + barHeight / 2); + startDependencyThumb.setAttribute('r', barHeight / 4); + startDependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(startDependencyThumb); + } + var dependencyThumb = document.createElementNS(svgns, 'circle'); + dependencyThumb.setAttribute('cx', itemRight - 2); + dependencyThumb.setAttribute('cy', barMargin + barHeight / 2); + dependencyThumb.setAttribute('r', barHeight / 4); + dependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(dependencyThumb); + ganttChartView.initializeDependencyDraggingThumbs(dependencyThumb, startDependencyThumb, group, item, barMargin + barHeight / 2, itemRight - 2, itemLeft); + } + } + return group; + }; + settings.summaryTaskTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + var group = getChartItemArea(item); + var itemLeft = ganttChartView.getChartPosition(item.start); + var itemRight = ganttChartView.getChartPosition(item.finish); + var height = settings.barHeight * 2.15 / 2.65; + var bar = document.createElementNS(svgns, 'rect'); + bar.setAttribute('x', itemLeft); + bar.setAttribute('y', settings.barMargin); + bar.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + bar.setAttribute('height', height); + var barClass = settings.summaryBarClass; + if (typeof item.summaryBarClass !== undefinedType) + barClass = item.summaryBarClass; + if (typeof item.barClass !== undefinedType) + barClass = item.barClass; + if (typeof barClass !== undefinedType) + bar.setAttribute('class', barClass); + else { + var barStyle = settings.summaryBarStyle; + if (typeof item.summaryBarStyle !== undefinedType) + barStyle = item.summaryBarStyle; + if (typeof item.barStyle !== undefinedType) + barStyle = item.barStyle; + if (typeof barStyle !== undefinedType) + bar.setAttribute('style', barStyle); + } + group.appendChild(bar); + if (!item.isExpanded) { + var line = document.createElementNS(svgns, 'line'); + line.setAttribute('x1', itemLeft); + line.setAttribute('y1', settings.barMargin + height + 2.5); + line.setAttribute('x2', itemRight - 1); + line.setAttribute('y2', settings.barMargin + height + 2.5); + var lineClass = settings.collapsedSummaryLineClass; + if (typeof item.collapsedSummaryLineClass !== undefinedType) + lineClass = item.collapsedSummaryLineClass; + if (typeof lineClass !== undefinedType) + line.setAttribute('class', lineClass); + else { + var lineStyle = settings.collapsedSummaryLineStyle; + if (typeof item.collapsedSummaryLineStyle !== undefinedType) + lineStyle = item.collapsedSummaryLineStyle; + if (typeof lineStyle !== undefinedType) + line.setAttribute('style', lineStyle); + } + group.appendChild(line); + } + var startTriangle = document.createElementNS(svgns, 'polygon'), x; + var y = settings.barMargin - 0.25, h = height + 1.5, tw = settings.barHeight * 3 / 4, teh = settings.barHeight / 4; + x = itemLeft - 1 - settings.barHeight / 3; + startTriangle.setAttribute('points', x + ',' + y + ' ' + x + ',' + (y + h) + ' ' + (x + tw / 2) + ',' + (y + h + teh) + ' ' + (x + tw) + ',' + (y + h) + ' ' + (x + tw) + ',' + y); + if (typeof barClass !== undefinedType) + startTriangle.setAttribute('class', barClass); + if (typeof barStyle !== undefinedType) + startTriangle.setAttribute('style', barStyle); + group.appendChild(startTriangle); + var endTriangle = document.createElementNS(svgns, 'polygon'); + x = itemRight + settings.barHeight / 3; + endTriangle.setAttribute('points', x + ',' + y + ' ' + x + ',' + (y + h) + ' ' + (x - tw / 2) + ',' + (y + h + teh) + ' ' + (x - tw) + ',' + (y + h) + ' ' + (x - tw) + ',' + y); + if (typeof barClass !== undefinedType) + endTriangle.setAttribute('class', barClass); + if (typeof barStyle !== undefinedType) + endTriangle.setAttribute('style', barStyle); + group.appendChild(endTriangle); + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + if (settings.areTaskDependenciesVisible && !settings.areTaskPredecessorsReadOnly && !item.isPart) { + var startDependencyThumb = null; + if (typeof settings.allowCreatingStartDependencies === undefinedType || settings.allowCreatingStartDependencies) { + startDependencyThumb = document.createElementNS(svgns, 'circle'); + startDependencyThumb.setAttribute('cx', itemLeft - 0.5); + startDependencyThumb.setAttribute('cy', settings.barMargin + settings.barHeight / 2); + startDependencyThumb.setAttribute('r', settings.barHeight / 4); + startDependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(startDependencyThumb); + } + var dependencyThumb = document.createElementNS(svgns, 'circle'); + dependencyThumb.setAttribute('cx', itemRight - 0.5); + dependencyThumb.setAttribute('cy', settings.barMargin + settings.barHeight / 2); + dependencyThumb.setAttribute('r', 2.5); + dependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(dependencyThumb); + ganttChartView.initializeDependencyDraggingThumbs(dependencyThumb, startDependencyThumb, group, item, settings.barMargin + settings.barHeight / 2, itemRight - 1.5, itemLeft); + } + } + return group; + }; + settings.milestoneTaskTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + var group = getChartItemArea(item); + if (settings.isBaselineVisible && typeof item.baselineStart !== undefinedType) { + var itemBaselineLeft = ganttChartView.getChartPosition(item.baselineStart); + var baselineStartDiamond = document.createElementNS(svgns, 'polygon'); + var xb = itemBaselineLeft, yb = settings.barMargin - 1, hb = settings.barHeight + 1; + baselineStartDiamond.setAttribute('points', xb + ',' + yb + ' ' + (xb - hb / 2) + ',' + (yb + hb / 2) + ' ' + xb + ',' + (yb + hb) + ' ' + (xb + hb / 2) + ',' + (yb + hb / 2)); + var baselineBarClass = settings.baselineBarClass; + if (typeof item.baselineBarClass !== undefinedType) + baselineBarClass = item.baselineBarClass; + if (typeof baselineBarClass !== undefinedType) + baselineStartDiamond.setAttribute('class', baselineBarClass); + else { + var baselineBarStyle = settings.baselineBarStyle; + if (typeof item.baselineBarStyle !== undefinedType) + baselineBarStyle = item.baselineBarStyle; + } + baselineStartDiamond.setAttribute('style', baselineBarStyle); + group.appendChild(baselineStartDiamond); + } + var itemLeft = ganttChartView.getChartPosition(item.start); + var startDiamond = document.createElementNS(svgns, 'polygon'); + var x = itemLeft - 1, y = settings.barMargin, h = settings.barHeight + 1; + startDiamond.setAttribute('points', x + ',' + y + ' ' + (x - h / 2) + ',' + (y + h / 2) + ' ' + x + ',' + (y + h) + ' ' + (x + h / 2) + ',' + (y + h / 2)); + var barClass = settings.milestoneBarClass; + if (typeof item.milestoneBarClass !== undefinedType) + barClass = item.milestoneBarClass; + if (typeof item.barClass !== undefinedType) + barClass = item.barClass; + if (typeof barClass !== undefinedType) + startDiamond.setAttribute('class', barClass); + else { + var barStyle = settings.milestoneBarStyle; + if (typeof item.milestoneBarStyle !== undefinedType) + barStyle = item.milestoneBarStyle; + if (typeof item.barStyle !== undefinedType) + barStyle = item.barStyle; + if (typeof barStyle !== undefinedType) + startDiamond.setAttribute('style', barStyle); + } + group.appendChild(startDiamond); + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + var thumb = document.createElementNS(svgns, 'rect'); + thumb.setAttribute('x', x - h / 2); + thumb.setAttribute('y', settings.barMargin); + thumb.setAttribute('width', h); + thumb.setAttribute('height', h); + thumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(thumb); + ganttChartView.initializeTaskDraggingThumbs(thumb, null, null, null, item, x, x, x); + if (settings.areTaskDependenciesVisible && !settings.areTaskPredecessorsReadOnly && !item.isPart) { + var dependencyThumb = document.createElementNS(svgns, 'circle'); + dependencyThumb.setAttribute('cx', x); + dependencyThumb.setAttribute('cy', settings.barMargin + settings.barHeight / 2); + dependencyThumb.setAttribute('r', settings.barHeight / 4); + dependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(dependencyThumb); + ganttChartView.initializeDependencyDraggingThumbs(dependencyThumb, null, group, item, settings.barMargin + settings.barHeight / 2, x, x); + } + } + return group; + }; + settings.dependencyLineTemplate = function (item, predecessorItem) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + function getDependencyLinePathData(item, predecessorItem) { + var y = ganttChartView.getItemTop(predecessorItem.item); + var y1 = ganttChartView.getItemTop(item); + var d = 'M ', x, x1, x2, y, h = settings.itemHeight, h2 = h / 2, extraLineLength = h / 3.5, arrowSpace = 3.5, horizontal = false, x0; + if (y == y1 && (typeof predecessorItem.dependencyType === undefinedType || predecessorItem.dependencyType == 'FinishStart' || predecessorItem.dependencyType == 'FS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + if (typeof predecessorItem.dependencyType === undefinedType || predecessorItem.dependencyType == 'FinishStart' || predecessorItem.dependencyType == 'FS') { + x = ganttChartView.getChartPosition(predecessorItem.item.finish); + x1 = ganttChartView.getChartPosition(item.start); + } + else { + x = ganttChartView.getChartPosition(predecessorItem.item.start); + x1 = ganttChartView.getChartPosition(item.finish); + } + y = y - y1 + 0.5; + d += x + ' ' + (y + h2) + ' L ' + (x1 + (x1 > x ? -1 : +1) * (h / 5 - 1)) + ' ' + (y + h2); + } + else { + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + x = ganttChartView.getChartPosition(predecessorItem.item.start); + if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))) + x -= settings.barMargin * 5 / 8 + 0.25; + else if (predecessorItem.item.isMilestone) + x -= h / 4; + x1 = x - extraLineLength; + } + else { + x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1; + if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)) + x += settings.barMargin * 5 / 8 + 0.25; + else if (predecessorItem.item.isMilestone) + x += h / 4; + else { + x0 = ganttChartView.getChartPosition(predecessorItem.item.start) + 4 - 1; + if (x < x0) + x = x0; + } + x1 = x + extraLineLength; + } + y = y - y1; + d += x + ' ' + (y + h2) + ' L ' + x1 + ' ' + (y + h2); + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + x = ganttChartView.getChartPosition(item.finish) - 1; + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) { + horizontal = true; + if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled)) + x += settings.barMargin * 5 / 8 + 1; + else if (item.isMilestone) + x += h / 4 + 1; + else { + x0 = ganttChartView.getChartPosition(item.start) + 4 - 1; + if (x < x0) + x = x0; + } + x2 = x + extraLineLength; + } + else { + if (item.isMilestone) + x2 = x; + else { + x0 = ganttChartView.getChartPosition(item.start) + 4; + if (x < x0) + x = x0; + x2 = x - 2.5; + } + } + } + else { + x = ganttChartView.getChartPosition(item.start); + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) { + horizontal = true; + if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled)) + x -= settings.barMargin * 5 / 8 + 1; + else if (item.isMilestone) + x -= h / 4 + 1; + x2 = x - extraLineLength; + } + else { + if (item.isMilestone) + x2 = x - 1; + else { + x2 = x + 1.5; + var xf = ganttChartView.getChartPosition(item.finish); + if (x2 < x1 && xf - x1 > extraLineLength * 2 && item.start >= predecessorItem.item.finish) + x2 = x1; + } + } + } + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + if (x2 > x1) { + y -= extraLineLength / 6; + if (y <= 0) + y += h2; + else + y -= h2 - 2.5; + d += ' ' + x1 + ' ' + (y + h2); + } + d += ' ' + x2 + ' ' + (y + h2); + } + else { + if (x2 < x1) { + y -= extraLineLength / 6; + if (y <= 0) + y += h2; + else + y -= h2 - 2.5; + d += ' ' + x1 + ' ' + (y + h2); + } + d += ' ' + x2 + ' ' + (y + h2); + } + if (horizontal) + y = h2 + 0.5; + else if (y <= 0) + y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace; + else + y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace; + if (horizontal) { + if (x2 > x - arrowSpace) + arrowSpace = -arrowSpace; + x -= arrowSpace; + } + d += ' ' + x2 + ' ' + y; + if (horizontal) + d += ' ' + x + ' ' + y; + } + return d; + } + var group = document.createElementNS(svgns, 'g'); + var data = getDependencyLinePathData(item, predecessorItem); + var polylineZone = document.createElementNS(svgns, 'path'); + polylineZone.setAttribute('d', data); + if (typeof settings.dependencyLineZoneClass !== undefinedType) + polylineZone.setAttribute('class', settings.dependencyLineZoneClass); + if (typeof settings.dependencyLineZoneStyle !== undefinedType) + polylineZone.setAttribute('style', settings.dependencyLineZoneStyle); + group.appendChild(polylineZone); + var polyline = document.createElementNS(svgns, 'path'); + polyline.setAttribute('d', data); + var polylineClass = settings.dependencyLineClass; + if (typeof predecessorItem.dependencyLineClass !== undefinedType) + polylineClass = predecessorItem.dependencyLineClass; + if (typeof polylineClass !== undefinedType) + polyline.setAttribute('class', polylineClass); + else { + var polylineStyle = settings.dependencyLineStyle; + if (typeof predecessorItem.dependencyLineStyle !== undefinedType) + polylineStyle = predecessorItem.dependencyLineStyle; + if (typeof polylineStyle !== undefinedType) + polyline.setAttribute('style', polylineStyle); + } + group.appendChild(polyline); + return group; + }; + settings.assignmentsTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var document = ganttChartView.ownerDocument; + var text = document.createElementNS(svgns, 'text'); + var itemRight = ganttChartView.getChartPosition(item.finish); + if (item.isMilestone || (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))) + itemRight += settings.barHeight / 2; + text.setAttribute('x', itemRight + 7); + text.setAttribute('y', settings.barMargin + settings.barHeight - 1); + var isPhone = settings.target == 'Phone'; + var content = !isPhone ? item.assignmentsContent : item.content; + if (typeof content === undefinedType) + content = ''; + text.appendChild(document.createTextNode(content)); + if (typeof settings.assignmentsClass !== undefinedType) + text.setAttribute('class', settings.assignmentsClass); + else if (typeof settings.assignmentsStyle !== undefinedType) + text.setAttribute('style', settings.assignmentsStyle); + return text; + }; + settings.itemTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var document = item.ganttChartView.ownerDocument; + var toolTip = document.createElementNS(svgns, 'title'); + toolTip.appendChild(getTextNode(document, item.content)); + if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { + if (typeof item.loadChartView === undefinedType) { + if (typeof item.scheduleChartView === undefinedType && item.parent) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); + } + if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); + } + if (item.hasChildren) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); + } + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); + if (!item.isMilestone) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); + } + if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); + } + if (!item.isMilestone) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); + if (settings.isTaskCompletedEffortVisible) { + var completion = ganttChartView.getItemCompletion(item); + if (!isNaN(completion)) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); + } + } + } + if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { + toolTip.appendChild(document.createTextNode('\n')); + var predecessorsString = ''; + for (var i = 0; i < item.predecessors.length; i++) { + var predecessor = item.predecessors[i]; + if (!predecessor.item) + continue; + if (predecessorsString.length > 0) + predecessorsString += ', '; + predecessorsString += predecessor.item.content; + if (predecessor.dependencyType) + predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; + } + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); + } + } + else if (!isNaN(item.units)) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); + } + } + return toolTip; + }; + settings.predecessorItemTemplate = function (item, predecessorItem) { + var document = item.ganttChartView.ownerDocument; + var toolTip = document.createElementNS(svgns, 'title'); + toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); + if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { + if (predecessorItem.dependencyType) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); + } + if (predecessorItem.lag) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); + } + } + return toolTip; + }; +} +function initializePertChartTemplates(settings, theme) { + if (theme == 'Default') + return; + // Common helpers. + var svgns = 'http://www.w3.org/2000/svg'; + // Template definitions. + settings.styleDefinitionTemplate = function () { + var defs = document.createElementNS(svgns, 'defs'); + var arrowMarker = document.createElementNS(svgns, 'marker'); + arrowMarker.setAttribute('id', 'PertArrowMarker'); + arrowMarker.setAttribute("viewBox", "0 0 10 10"); + arrowMarker.setAttribute("refX", "0"); + arrowMarker.setAttribute("refY", "5"); + arrowMarker.setAttribute("markerUnits", "strokeWidth"); + arrowMarker.setAttribute("markerWidth", "5"); + arrowMarker.setAttribute("markerHeight", "4"); + arrowMarker.setAttribute("orient", "auto"); + var arrowPath = document.createElementNS(svgns, "path"); + arrowPath.setAttribute("fill", settings.arrowFill ? settings.arrowFill : '#3b87d9'); + arrowPath.setAttribute("d", "M 0 0 L 10 5 L 0 10 z"); + arrowMarker.appendChild(arrowPath); + defs.appendChild(arrowMarker); + return defs; + }; +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/themes.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/themes.js new file mode 100644 index 000000000..d46f56e8e --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryBackgroundColors/themes.js @@ -0,0 +1,207 @@ +// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero. +function initializeGanttChartTheme(settings, theme) { + if (theme == 'Default') + return; + if (theme == 'Aero') { + settings.theme = 'Aero'; + return; + } + settings.headerHeight = 31 * 2; // 2 scale rows + settings.itemHeight = 28; + settings.barCornerRadius = 1; + settings.completedBarCornerRadius = 1; + settings.arrowSize = 2; + settings.hourWidth = 5; + switch (theme) { + case 'Generic-bright': + settings.headerBackground = 'white'; + settings.mainStroke = '#005c9e'; + settings.mainFill = 'white'; + settings.accentFill = '#005c9e'; + settings.diamondFill = '#e31d3b'; + settings.diamondStroke = '#005c9e'; + break; + case 'Generic-blue': + settings.headerBackground = 'white'; + break; + case 'Purple-green': + settings.headerBackground = '#dddfd4'; + settings.mainStroke = '#005173'; + settings.mainFill = '#a0729d'; + settings.accentFill = '#91bc0e'; + break; + case 'Blue-navy': + settings.headerBackground = '#eeeeee'; + settings.selectedGridBackground = '#e8e8e8'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#369bf9'; + settings.accentFill = '#227fd5'; + settings.alternativeGridBackground = '#f9f9f9'; + break; + case 'Orange-brown': + settings.headerBackground = '#eeeeee'; + settings.selectedGridBackground = '#e8e8e8'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#ffbf5a'; + settings.accentFill = '#d5a05a'; + settings.diamondFill = '#a91923'; + settings.diamondStroke = '#222222'; + settings.alternativeBackground = '#f9f9f9'; + break; + case 'Teal-green': + settings.headerBackground = '#eeeeee'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#5ebcbb'; + settings.accentFill = '#3294a1'; + settings.diamondFill = '#4c7f3d'; + settings.diamondStroke = '#222222'; + break; + case 'Steel-blue': + settings.border = '#aaaaaa'; + settings.headerBackground = '#4b5d6b'; + settings.headerForeground = 'white'; + settings.headerBorder = '#aaaaaa'; + settings.containerBackground = '#a5b5c2'; + settings.chartBackground = '#bfcfda'; + settings.gridForeground = 'gray'; + settings.toggleFill = 'gray'; + settings.selectedGridForeground = '#4b5d6b'; + settings.selectedGridBackground = '#95a5b2'; + settings.nonworkingBackground = '#95a5b2'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#6699cc'; + settings.accentFill = '#4c7f3d'; + settings.diamondFill = '#4b5d6b'; + settings.diamondStroke = '#222222'; + break; + case 'Cyan-green': + settings.headerBackground = '#dddddd'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#1fb5ce'; + settings.accentFill = '#1fce43'; + settings.diamondFill = '#d6485b'; + settings.diamondStroke = '#222222'; + break; + case 'Purple-beige': + settings.selectedGridBackground = '#bfb8a4'; + settings.mainStroke = '#005c9e'; + settings.mainFill = '#a68b99'; + settings.accentFill = '#bfb8a4'; + settings.diamondFill = '#bfb8a4'; + settings.diamondStroke = '#005c9e'; + settings.alternativeGridBackground = '#f0eeeb'; + settings.alternativeChartBackground = '#f9f9f9'; + break; + case 'Dark-black': + settings.containerClass = 'dark'; // CSS class for dynamically generated elements, e.g. input (app.css) + settings.border = '#222222'; + settings.headerBackground = '#111111'; + settings.headerForeground = '#eeeeee'; + settings.headerBorder = '#222222'; + settings.containerBackground = '#222222'; + settings.gridForeground = '#dddddd'; + settings.chartForeground = '#dddddd'; + settings.scaleSeparatorBorder = '#505050'; + settings.toggleFill = '#808080'; + settings.toggleHoveringFill = 'white'; + settings.selectedGridForeground = 'white'; + settings.selectedGridBackground = '#404040'; + settings.nonworkingBackground = '#333333'; + settings.mainStroke = 'gray'; + settings.accentFill = '#ffbb00'; + settings.summaryFill = '#505050'; + settings.diamondFill = '#ffbb00'; + settings.currentTimeStroke = '#289451'; + break; + case 'Gray-blue': + settings.headerBackground = 'white'; + settings.containerBackground = '#f0f0f0'; + settings.selectedGridBackground = 'white'; + settings.mainStroke = '#005c9e'; + settings.mainFill = 'white'; + settings.accentFill = '#0087be'; + settings.diamondFill = '#607080'; + settings.diamondStroke = '#005c9e'; + break; + case 'DlhSoft-gray': + settings.border = '#aaaaaa'; + settings.headerBackground = '#e31d3b'; + settings.headerForeground = 'white'; + settings.headerBorder = 'transparent'; + settings.selectedGridBackground = '#e8e8e8'; + settings.mainStroke = '#666'; + settings.mainFill = '#f0f0f0'; + settings.accentFill = '#ad927f'; + settings.summaryFill = '#666'; + settings.diamondFill = '#82a0b3'; + settings.diamondStroke = '#666'; + settings.alternativeGridBackground = '#f8f8f8'; + settings.currentTimeStroke = '#82a0b3'; + break; + } + if (settings.containerBackground) + settings.containerStyle = 'background-color: ' + settings.containerBackground; + if (settings.headerForeground) + settings.columnHeaderStyle = 'color: ' + settings.headerForeground; + if (settings.gridForeground) { + settings.itemStyle = 'color: ' + settings.gridForeground + (settings.gridBackground ? '; background-color: ' + settings.gridBackground : ''); + if (settings.selectedGridForeground) + settings.selectedItemStyle = 'color: ' + settings.selectedGridForeground + '; background-color: ' + (settings.selectedGridBackground ? settings.selectedGridBackground : settings.gridForeground); + } + else { + if (settings.selectedGridForeground || settings.selectedGridBackground) + settings.selectedItemStyle = 'color: ' + (settings.selectedGridForeground ? settings.selectedGridForeground : 'black') + '; background-color: ' + (settings.selectedGridBackground ? settings.selectedGridBackground : '#f0f0f0'); + } + if (settings.toggleFill) + settings.toggleButtonStyle = 'fill: ' + settings.toggleFill; + if (settings.toggleHoveringFill) + settings.toggleButtonHoveringStyle = 'fill: ' + settings.toggleHoveringFill; + settings.scales = [{ scaleType: 'NonworkingTime', isHeaderVisible: false, isHighlightingVisible: true, highlightingStyle: 'stroke-width: 0; fill: ' + (settings.nonworkingBackground ? settings.nonworkingBackground : '#f8f8f8') + '; fill-opacity: 0.65' }, + { scaleType: 'Weeks', headerTextFormat: 'Date', headerStyle: 'padding: 7px 5px; border-right: 1px solid ' + (settings.headerBorder ? settings.headerBorder : '#e8e8e8') + '; border-bottom: 1px solid ' + (settings.headerBorder ? settings.headerBorder : '#e8e8e8') + (settings.headerForeground ? '; color: ' + settings.headerForeground : ''), isSeparatorVisible: true, separatorStyle: 'stroke: ' + (settings.scaleSeparatorBorder ? settings.scaleSeparatorBorder : '#c8bfe7') + '; stroke-width: 0.5px' }, + { scaleType: 'Days', headerTextFormat: 'DayOfWeekAbbreviation', headerStyle: 'padding: 7px 5px; border-right: 1px solid ' + (settings.headerBorder ? settings.headerBorder : '#e8e8e8') + (settings.headerForeground ? '; color: ' + settings.headerForeground : '') }, + { scaleType: 'CurrentTime', isHeaderVisible: false, isSeparatorVisible: true, separatorStyle: 'stroke: ' + (settings.currentTimeStroke ? settings.currentTimeStroke : '#e31d3b') + '; stroke-width: 0.5px' }]; + if (settings.chartBackground) + settings.scales.splice(0, 0, { scaleType: 'Custom', isHeaderVisible: false, intervals: [{ start: new Date(1, 0, 1), finish: new Date(10000, 11, 31, 23, 59, 59, 999) }], isHighlightingVisible: true, highlightingStyle: 'fill: ' + settings.chartBackground }); + if (settings.mainFill) { + settings.standardBarStyle = 'stroke: ' + (settings.mainStroke ? settings.mainStroke : settings.mainFill) + '; fill: ' + settings.mainFill; + settings.collapsedSummaryLineStyle = 'stroke: ' + (settings.mainStroke ? settings.mainStroke : settings.mainFill) + '; stroke-width: 0.65px; stroke-dasharray: 2 2'; + } + if (settings.accentFill) + settings.standardCompletedBarStyle = 'stroke: ' + settings.accentFill + '; fill: ' + settings.accentFill; + if (settings.summaryFill) + settings.summaryBarStyle = 'stroke: ' + (settings.summaryStroke ? settings.summaryStroke : settings.summaryFill) + '; fill: ' + settings.summaryFill; + if (settings.diamondFill) + settings.milestoneBarStyle = 'stroke: ' + (settings.diamondStroke ? settings.diamondStroke : settings.diamondFill) + '; fill: ' + settings.diamondFill; + if (settings.mainStroke) { + settings.baselineBarStyle = 'fill: none; stroke: ' + settings.mainStroke + '; stroke-width: 0.65px; stroke-dasharray: 2, 2'; + settings.arrowFill = settings.mainStroke; + settings.dependencyLineStyle = 'stroke: ' + settings.arrowFill + '; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)'; + } + if (settings.chartForeground) + settings.assignmentsStyle = 'font-size: x-small; fill: ' + settings.chartForeground; + if (settings.alternativeBackground) { + settings.alternativeGridBackground = settings.alternativeBackground; + settings.alternativeChartBackground = settings.alternativeBackground; + } + if (settings.alternativeGridBackground) + settings.alternativeItemStyle = 'background-color: ' + settings.alternativeGridBackground; + if (settings.alternativeChartBackground) + settings.alternativeChartItemStyle = 'fill: ' + settings.alternativeChartBackground; +} +function initializeLoadChartTheme(settings, theme) { + initializeGanttChartTheme(settings, theme); + if (theme == 'Default') + return; + settings.barHeight = 20; + settings.allocationFill = settings.mainFill ? (settings.mainFill != 'white' ? settings.mainFill : settings.mainStroke) : '#8abbed'; + settings.normalAllocationBarStyle = settings.underAllocationBarStyle = 'stroke: ' + settings.allocationFill + '; fill: ' + settings.allocationFill; + settings.overAllocationBarStyle = 'stroke: #e31d3b; fill: #e31d3b'; +} +function initializePertChartTheme(settings, theme) { + if (theme == 'Default') + return; + settings.shapeStyle = 'fill: White; stroke: #606060; stroke-width: 1px'; + settings.milestoneStyle = 'fill: White; stroke: #606060; stroke-width: 1px'; + settings.dependencyLineStyle = 'stroke: #8abbed; stroke-width: 0.65px; fill: none; marker-end: url(#PertArrowMarker)'; + settings.virtualEffortDependencyLineStyle = 'stroke: #8abbed; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#PertArrowMarker)'; +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating.zip new file mode 100644 index 000000000..10add4bab Binary files /dev/null and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.Angular.Directives.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.Angular.Directives.js new file mode 100644 index 000000000..0823d6ad8 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.Angular.Directives.js @@ -0,0 +1,243 @@ +// Version 1.1.0.0. +var module = angular.module("DlhSoft.Data.Directives", []); +dsDefineDDirective(module, "ContentControl"); +dsDefineDIDirective(module, "ItemsControl"); +dsDefineDDirective(module, "Button", ["click"]); +dsDefineDDirective(module, "ToggleButton", ["toggle"]); +dsDefineDDirective(module, "TextBox", undefined, true); +dsDefineDDirective(module, "CalendarSelector", ["selectedTime"]); +dsDefineDDirective(module, "Calendar", ["selectedDate"]); +dsDefineDVDirective(module, "DatePicker"); +dsDefineDDirective(module, "CalendarDay", ["selectedTime", "header"]); +dsDefineDVDirective(module, "TimePicker", ["header"]); +dsDefineDVDirective(module, "DateTimePicker"); +dsDefineDCVDirective(module, "MultiSelectorComboBox"); +dsDefineDCVDirective(module, "ComboBox"); +dsDefineDCVDirective(module, "DropDownList"); +dsDefineDCDirective(module, "ToolTip"); +dsDefineDGDirective(module, "Grid"); +function dsDefineDDirective(module, directiveName, appendedScope, isChangeHandler, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: getScope({ + settings: "=", + license: "=" + }, appendedScope, isChangeHandler), + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var valueProperty = null; + var initialization = function () { + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + if (isChangeHandler) { + valueProperty = appendedScope ? (appendedScope.indexOf("value") < 0 ? appendedScope[0] : "value") : "value"; + var changeHandler = settings.valueChangeHandler; + if (!changeHandler) + changeHandler = settings.changeHandler; + settings.changeHandler = settings.valueChangeHandler = function (value) { + if (changeHandler) + changeHandler(value); + scope[valueProperty] = value; + scope.$apply(); + if (scope.change) + scope.change(value); + } + } + var component = DlhSoft.Controls[controlName ? controlName : directiveName].initialize.apply(this, getArguments([controlElement, settings, license], appendedScope, scope)); + if (isChangeHandler && component.setValue) + component.setValue(valueProperty && scope[valueProperty] ? scope[valueProperty] : element.text()); + } + initialization(); + if (valueProperty) { + scope.$watch(valueProperty, function (nv, ov) { + if (nv == ov) + return; + var component = DlhSoft.Controls[controlName ? controlName : directiveName].get(controlElement); + var newValue = scope[valueProperty]; + if (component.setValue && component.getValue && newValue != component.getValue()) + setTimeout(function () { component.setValue(newValue); }); + }); + } + } + }; + }); +} +function dsDefineDVDirective(module, directiveName, appendedScope, controlName) { + dsDefineDDirective(module, directiveName, combineScopes(["value"], appendedScope), true, controlName); +} +function dsDefineDIDirective(module, directiveName, appendedScope, controlName) { + dsDefineDDirective(module, directiveName, combineScopes(["items"], appendedScope), true, controlName); +} +function dsDefineDCVDirective(module, directiveName, appendedScope, controlName) { + dsDefineDDirective(module, directiveName, combineScopes(["availableChoices", "value"], appendedScope), true, controlName); +} +function dsDefineDCDirective(module, directiveName, appendedScope, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: getScope({ + settings: "=", + license: "=" + }, appendedScope), + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var parent = element.parent(); + var targetElement = parent[0]; + var initialization = function () { + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + DlhSoft.Controls[controlName ? controlName : directiveName].initialize.apply(this, getArguments([controlElement, targetElement, settings, license], appendedScope, scope, 1)); + } + initialization(); + } + }; + }); +} +function dsDefineDGDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls[controlName ? controlName : directiveName].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function () { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} +function combineScopes(scope, appendedScope) { + if (appendedScope) { + for (var i = 0; i < appendedScope.length; i++) + scope.push(appendedScope[i]); + } + return scope; +} +function getScope(scope, appendedScope, isChangeHandler) { + if (appendedScope) { + for (var i = 0; i < appendedScope.length; i++) + scope[appendedScope[i]] = "="; + } + else if (isChangeHandler) + scope["value"] = "="; + if (isChangeHandler) + scope["change"] = "="; + return scope; +} +function getArguments(arguments, appendedScope, scope, injectionIndex) { + if (typeof injectionIndex === "undefined") + injectionIndex = 0; + if (appendedScope) { + for (var i = 0; i < appendedScope.length; i++) + arguments.splice(i + injectionIndex + 1, 0, scope[appendedScope[i]]); + } + return arguments; +} +function dsDefineHDDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls[controlName ? controlName : directiveName].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function() { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.HTML.Controls.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.HTML.Controls.d.ts new file mode 100644 index 000000000..bba6b997b --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.HTML.Controls.d.ts @@ -0,0 +1,679 @@ +/// +declare module DlhSoft.Controls { + module ContentControl { + function initialize(element: HTMLElement, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IContentContainer { + public host: HTMLElement; + public settings: Settings; + constructor(host: HTMLElement, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + static getContent(host: HTMLElement): HTMLElement; + public refresh(): void; + public content: any; + public setContent(content: any): void; + public contentContainer: HTMLElement; + } + interface Settings { + theme?: string; + containerStyle?: string; + containerClass?: string; + content?: any; + contentTemplate? (document: HTMLDocument, content: any): HTMLElement; + } + } + module ItemsControl { + function initialize(element: HTMLElement, items?: any[], settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IItemsContainer { + public host: HTMLElement; + public settings: Settings; + constructor(host: HTMLElement, items?: any[], settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + static getItems(host: HTMLElement): HTMLElement[]; + public refresh(): void; + public items: any[]; + public setItems(items: any[]): void; + public itemContainers: HTMLElement[]; + } + interface Settings { + theme?: string; + itemContainerStyle?: string; + itemContainerClass?: string; + items?: any[]; + itemTemplate? (document: HTMLDocument, item: any): HTMLElement; + } + } + module Button { + function initialize(element: HTMLElement, clickHandler?: () => void, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IContentContainer, IHoverable, IPressable, IClickable, ISupportsDisabling { + public host: HTMLElement; + public clickHandler: () => void; + public settings: Settings; + constructor(host: HTMLElement, clickHandler?: () => void, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public content: any; + public setContent(content: any): void; + public isEnabled: boolean; + public enable(): void; + public disable(): void; + public isHovering: boolean; + public isPressed: boolean; + public contentControlHost: HTMLElement; + public contentControl: ContentControl.Element; + private inputHost; + public inputElement: HTMLInputElement; + public contentControlSettings: ContentControl.Settings; + public contentContainer: HTMLElement; + public hoverableContainer: HTMLElement; + public pressableContainer: HTMLElement; + } + interface Settings extends ContentControl.Settings { + inputName?: string; + inputType?: string; + isEnabled?: boolean; + disabledStyle?: string; + disabledClass?: string; + hoveringStyle?: string; + hoveringClass?: string; + pressedStyle?: string; + pressedClass?: string; + contentStyle?: string; + contentClass?: string; + hoveringHandler? (target: IHoverable): void; + unhoveringHandler? (target: IHoverable): void; + pressedHandler? (target: IPressable): void; + unpressedHandler? (target: IPressable): void; + } + } + module ToggleButton { + function initialize(element: HTMLElement, toggleHandler?: (isPressed: boolean) => void, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element extends Button.Element implements IControlElement, IContentContainer, IHoverable, IPressable, IClickable { + public toggleHandler: (isPressed: boolean) => void; + constructor(host: HTMLElement, toggleHandler?: (isPressed: boolean) => void, settings?: Settings, license?: String); + public isInitialized: boolean; + } + interface Settings extends Button.Settings { + } + } + module TextBox { + function initialize(element: HTMLElement, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, ITextEditor, ISupportsDisabling { + public host: HTMLElement; + public settings: Settings; + constructor(host: HTMLElement, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public value: string; + public getValue(): string; + public setValue(value: string): void; + public isEnabled: boolean; + public enable(): void; + public disable(): void; + private inputHost; + public inputElement: HTMLInputElement; + } + interface Settings { + theme?: string; + isEnabled?: boolean; + isReadOnly?: boolean; + value?: string; + inputName?: string; + inputType?: string; + inputStyle?: string; + inputClass?: string; + raiseChangeOnBlur?: boolean; + clickHandler? (): void; + changeHandler? (value: string): void; + } + } + module CalendarSelector { + function initialize(element: HTMLElement, selectedTime?: number, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, INumberEditor { + public host: HTMLElement; + public selectedTime: number; + public settings: Settings; + constructor(host: HTMLElement, selectedTime?: number, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public getValue(): number; + public setValue(value: number): void; + public setDisplayedValue(value: number): void; + } + interface Settings { + theme?: string; + headerProvider? (document: HTMLDocument, displayedTime: number): Node; + containerStyle?: string; + containerClass?: string; + headerStyle?: string; + headerClass?: string; + timeStyle?: string; + timeClass?: string; + selectedTimeStyle?: string; + selectedTimeClass?: string; + timeFormatter? (value: number): string; + displayedTime?: number; + rows?: number; + columns?: number; + invertMatrix?: boolean; + minValue?: number; + scrollingHeight?: string; + displayedTimeChangeHandler? (displayedTime: number): void; + selectedTimeChangeHandler? (selectedTime: number): void; + } + } + module Calendar { + function initialize(element: HTMLElement, selectedDate?: Date, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IDateEditor, IMultipleDateEditor, IDateRangeEditor, IMultipleDateRangeEditor { + public host: HTMLElement; + public selectedDate: Date; + public settings: Settings; + constructor(host: HTMLElement, selectedDate?: Date, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + private static weekDuration; + private static initialSundayDateTimeValue; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private draggingFromDate; + private draggingToDate; + public getValue(): Date; + public setValue(value: Date): void; + public setDisplayedValue(value: Date): void; + public getValues(): Date[]; + public setValues(values: Date[]): void; + public getValueRange(): DateInterval; + public setValueRange(valueRange: DateInterval): void; + public getValueRanges(): DateInterval[]; + public setValueRanges(valueRanges: DateInterval[]): void; + public isValueSelected(date: Date): boolean; + public invertValueSelection(date: Date): void; + public selectedDates: Date[]; + public selectedDateRange: DateInterval; + public selectedDateRanges: DateInterval[]; + private static getDate(dateTime); + private static getPreviousWeekStart(dateTime); + private static addDay(date); + private static subtractDay(date); + private static addTimeOfDay(date, timeOfDay); + private static getFirstDayOfMonth(dateTime); + } + interface Settings { + theme?: string; + isReadOnly?: boolean; + displayedDate?: Date; + isTodayLinkVisible?: boolean; + defaultTimeOfDay?: number; + calendarSelectorLevels?: number; + calendarSelectorPopupStyle?: string; + calendarSelectorPopupClass?: string; + containerStyle?: string; + containerClass?: string; + monthYearHeaderStyle?: string; + monthYearHeaderClass?: string; + dayOfWeekHeaderStyle?: string; + dayOfWeekHeaderClass?: string; + dayStyle?: string; + dayClass?: string; + otherMonthDayStyle?: string; + otherMonthDayClass?: string; + selectedDayStyle?: string; + selectedDayClass?: string; + todayLinkStyle?: string; + todayLinkClass?: string; + months?: string[]; + daysOfWeek?: string[]; + todayString?: string; + forceSetOnClick?: boolean; + displayedDateChangeHandler? (displayedDate: Date): void; + selectedDateChangeHandler? (selectedDate: Date): void; + monthRows?: number; + monthColumns?: number; + monthCellSpacing?: string; + monthCellStyle?: string; + monthCellClass?: string; + applyMonthStyleForSingleCell?: boolean; + applyNextMonthButtonToLastColumn?: boolean; + applyNextMonthButtonToLastRow?: boolean; + highlightingStyleSelector?: (Date: any, boolean: any) => string; + highlightingClassSelector?: (Date: any, boolean: any) => string; + disabledDayStyle?: string; + disabledDayClass?: string; + disabledDateSelector?: (Date: any) => boolean; + allowMultipleSelection?: boolean; + allowRangeSelection?: boolean; + selectionChangedHandler? (): void; + minValue?: Date; + } + } + module DatePicker { + function initialize(element: HTMLElement, value?: Date, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IDateEditor, IDropDown { + public host: HTMLElement; + public value: Date; + public settings: Settings; + constructor(host: HTMLElement, value?: Date, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private recordClick(); + private isDuringRecordedClick(); + public getValue(): Date; + public setValue(value: Date): void; + public setDisplayedValue(value: Date): void; + public refreshValue(): void; + private resetValue(value?); + public openDropDown(): void; + public closeDropDown(): void; + private toggleDropDown(); + private inputHost; + public inputElement: HTMLInputElement; + public dropDownButtonElement: HTMLElement; + public popupElement: HTMLElement; + public calendarHost: HTMLElement; + public calendar: Calendar.Element; + public isOpen: boolean; + } + interface Settings extends Calendar.Settings { + dateTimeFormatter? (value: Date): string; + dateTimeParser? (value: string): Date; + isNullValueAccepted?: boolean; + openDropDownOnInputClick?: boolean; + isDropDownButtonVisible?: boolean; + dropDownButtonDefinition?: string; + inputStyle?: string; + inputClass?: string; + popupStyle?: string; + popupClass?: string; + valueChangeHandler? (value: Date): void; + dropDownOpenedHandler? (): void; + dropDownClosedHandler? (): void; + } + } + module CalendarDay { + class Element implements IControlElement, INumberEditor { + public host: HTMLElement; + public selectedTime: number; + public header: string; + public settings: Settings; + constructor(host: HTMLElement, selectedTime?: number, header?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + static initializeSettings(settings: Settings): void; + public refresh(): void; + public getValue(): number; + public setValue(value: number): void; + private static getTime(time, hourDivisions); + } + interface Settings { + theme?: string; + header?: string; + isHeaderVisible?: boolean; + isReadOnly?: boolean; + isNowLinkVisible?: boolean; + containerStyle?: string; + containerClass?: string; + headerStyle?: string; + headerClass?: string; + timeStyle?: string; + timeClass?: string; + selectedTimeStyle?: string; + selectedTimeClass?: string; + nowLinkStyle?: string; + nowLinkClass?: string; + nowString?: string; + hourDivisions?: number; + timeFormatter? (value: number): string; + hourColumns?: number; + scrollingHeight?: string; + forceSetOnClick?: boolean; + selectedTimeChangeHandler? (selectedTime: number): void; + highlightingStyleSelector?: (number: any, boolean: any) => string; + highlightingClassSelector?: (number: any, boolean: any) => string; + disabledTimeStyle?: string; + disabledTimeClass?: string; + disabledTimeSelector?: (number: any) => boolean; + } + } + module TimePicker { + function initialize(element: HTMLElement, value?: number, header?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, INumberEditor, IDropDown { + public host: HTMLElement; + public value: number; + public header: string; + public settings: Settings; + constructor(host: HTMLElement, value?: number, header?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private recordClick(); + private isDuringRecordedClick(); + private isMouseWheelScrollingPopup(e); + public getValue(): number; + public setValue(value: number): void; + public refreshValue(): void; + private resetValue(value?); + public openDropDown(): void; + public closeDropDown(): void; + private toggleDropDown(); + private inputHost; + public inputElement: HTMLInputElement; + public dropDownButtonElement: HTMLElement; + public popupElement: HTMLElement; + public calendarDayHost: HTMLElement; + public calendarDay: CalendarDay.Element; + public isOpen: boolean; + } + interface Settings extends CalendarDay.Settings { + timeParser? (value: string): number; + isNullValueAccepted?: boolean; + openDropDownOnInputClick?: boolean; + isDropDownButtonVisible?: boolean; + dropDownButtonDefinition?: string; + inputStyle?: string; + inputClass?: string; + popupStyle?: string; + popupClass?: string; + defaultPrefix?: string; + valueChangeHandler? (value: number): void; + dropDownOpenedHandler? (): void; + dropDownClosedHandler? (): void; + } + } + module DateTimePicker { + function initialize(element: HTMLElement, value?: Date, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IElement, IDateEditor, IDropDown { + public host: HTMLElement; + public value: Date; + public settings: Settings; + constructor(host: HTMLElement, value?: Date, settings?: Settings, license?: String); + public isInitialized: boolean; + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + static initializeSettings(settings: Settings): void; + public datePicker: DatePicker.Element; + public timePicker: TimePicker.Element; + public inputElement: HTMLInputElement; + public refreshValue(): void; + public getValue(): Date; + public setValue(value: Date): void; + public getTimeValue(): number; + public setTimeValue(value: number): void; + public isOpen: boolean; + public openDropDown(): void; + public closeDropDown(): void; + public isTimeOpen: boolean; + public openTimeDropDown(): void; + public closeTimeDropDown(): void; + public getCurrentValuePart(): string; + } + interface Settings { + theme?: string; + isReadOnly?: boolean; + areCurrentLinksVisible?: boolean; + defaultTimeOfDay?: number; + dateTimeFormatter? (value: Date): string; + dateTimeParser? (value: string): Date; + isNullValueAccepted?: boolean; + popupStyle?: string; + popupClass?: string; + inputStyle?: string; + inputClass?: string; + openDropDownOnInputClick?: boolean; + areDropDownButtonsVisible?: boolean; + disabledDateSelector? (value: Date): boolean; + disabledTimeSelector? (value: number): boolean; + valueChangeHandler? (value: Date): void; + calendarSelectorLevels?: number; + months?: string[]; + daysOfWeek?: string[]; + datePickerSettings?: DatePicker.Settings; + timePickerSettings?: TimePicker.Settings; + } + } + module MultiSelectorComboBox { + function initialize(element: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, ITextEditor, ITextSelector, IDropDown { + public host: HTMLElement; + public availableChoices: string[]; + public value: string; + public settings: Settings; + constructor(host: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + static initializeSettings(settings: Settings): void; + public refresh(): void; + private recordClick(); + private isDuringRecordedClick(); + private isMouseWheelScrollingPopup(e); + public getValue(): string; + public setValue(value: string): void; + public refreshValue(): void; + private resetValue(value?); + private setValueInternal(value?, refresh?); + public refreshAvailableChoices(): void; + public getSelectedChoice(availableOnly?: boolean): string; + public getSelectedChoices(availableOnly?: boolean): string[]; + public refreshSelectedChoices(): void; + public selectChoice(choice: string): void; + public unselectChoice(choice: string): void; + private setSelectedChoice(choice, isSelected, closeDropDown?); + public openDropDown(): void; + public closeDropDown(): void; + private toggleDropDown(); + private inputHost; + public inputElement: HTMLInputElement; + public dropDownButtonElement: HTMLElement; + public popupElement: HTMLElement; + public checkBoxListElement: HTMLElement; + public checkBoxElements: HTMLElement[]; + public isOpen: boolean; + } + interface Settings { + theme?: string; + isReadOnly?: boolean; + autoAppendAvailableChoices?: boolean; + openDropDownOnInputClick?: boolean; + isDropDownButtonVisible?: boolean; + dropDownButtonDefinition?: string; + separator?: string; + isSpaceSeparated?: boolean; + delimiters?: string[]; + inputStyle?: string; + inputClass?: string; + popupStyle?: string; + popupClass?: string; + choiceStyle?: string; + choiceClass?: string; + selectedChoiceStyle?: string; + selectedChoiceClass?: string; + areCheckBoxesVisible?: boolean; + valueChangeHandler? (value: string): void; + dropDownOpenedHandler? (): void; + dropDownClosedHandler? (): void; + } + } + module ComboBox { + function initialize(element: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element extends MultiSelectorComboBox.Element { + constructor(host: HTMLElement, availableChoices?: string[], value?: string, settings?: Settings, license?: String); + public isInitialized: boolean; + } + interface Settings extends MultiSelectorComboBox.Settings { + } + } + module DropDownList { + function initialize(element: HTMLElement, availableChoices: string[], value?: string, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element extends ComboBox.Element { + } + interface Settings extends ComboBox.Settings { + } + } + module ToolTip { + function initialize(content: any, targetElement: HTMLElement, settings?: Settings, license?: String): Element; + function get(element: HTMLElement): Element; + class Element implements IControlElement, IAttached, ISupportsDisabling, ISupportsHiding, ISupportsPositioning, IContentContainer { + public content: any; + public targetElement: HTMLElement; + public settings: Settings; + constructor(content: any, targetElement: HTMLElement, settings?: Settings, license?: String); + public host: HTMLElement; + public contentContainer: HTMLElement; + public isInitialized: boolean; + public isEnabled: boolean; + public isVisible: boolean; + static initializeSettings(settings: Settings): void; + public x: number; + public y: number; + public refresh(): void; + public setPosition(x: number, y: number): void; + public setHorizontalPosition(x: number): void; + public setVerticalPosition(y: number): void; + public enable(): void; + public disable(): void; + public show(): void; + public hide(): void; + private static previouslyShown; + public setContent(content: any): void; + } + interface Settings { + theme?: string; + isEnabled?: boolean; + duration?: number; + isVisible?: boolean; + containerStyle?: string; + containerClass?: string; + shownHandler? (): void; + hiddenHandler? (): void; + } + } + module Grid { + function initialize(element: HTMLElement, items?: Item[], settings?: Settings, license?: String): Element; + function getDefaultColumns(items?: Item[], settings?: Settings): Column[]; + interface Element extends Controls.TreeGrid.Element { + } + interface Settings extends Controls.TreeGrid.Settings { + } + interface Column extends Controls.TreeGrid.Column { + } + interface Item extends Controls.TreeGrid.Item { + } + } + interface DateInterval { + start: Date; + finish: Date; + } + interface IElement { + isInitialized: boolean; + } + interface IControlElement extends IElement { + refresh(): void; + } + interface IContentContainer { + content: any; + setContent(content: any): void; + } + interface IItemsContainer { + items: any[]; + setItems(items: any[]): void; + } + interface IHoverable { + isHovering: boolean; + } + interface IPressable { + isPressed: boolean; + } + interface IClickable { + clickHandler(): void; + } + interface IChangeable { + changeHandler(value: any): void; + } + interface IEditor { + getValue(): any; + setValue(value: any): void; + } + interface INumberEditor extends IEditor { + getValue(): number; + setValue(value: number): void; + } + interface IDateEditor extends IEditor { + getValue(): Date; + setValue(value: Date): void; + } + interface IMultipleDateEditor extends IDateEditor { + getValues(): Date[]; + setValues(values: Date[]): void; + } + interface IDateRangeEditor extends IDateEditor { + getValueRange(): DateInterval; + setValueRange(valueRange: DateInterval): void; + } + interface IMultipleDateRangeEditor extends IDateRangeEditor, IMultipleDateEditor { + getValueRanges(): DateInterval[]; + setValueRanges(valueRanges: DateInterval[]): void; + } + interface ITextEditor extends IEditor { + getValue(): string; + setValue(value: string): void; + } + interface ITextSelector { + getSelectedChoice(): string; + getSelectedChoices(): string[]; + selectChoice(value: string): void; + unselectChoice(value: string): void; + } + interface IDropDown { + isOpen: boolean; + openDropDown(): void; + closeDropDown(): void; + } + interface IAttached { + targetElement: HTMLElement; + } + interface ISupportsDisabling { + isEnabled: boolean; + enable(): void; + disable(): void; + } + interface ISupportsHiding { + isVisible: boolean; + show(): void; + hide(): void; + } + interface ISupportsPositioning { + x: number; + y: number; + setPosition(x: number, y: number): void; + setHorizontalPosition(x: number): void; + setVerticalPosition(y: number): void; + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.HTML.Controls.js new file mode 100644 index 000000000..e0fcae2be --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.Data.HTML.Controls.js @@ -0,0 +1,204 @@ +"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.Data.HTML.Controls",company:"DlhSoft",product:"Data Modern Library",version:"5.2.3.0",copyright:"Copyright \ufffd 2014-2015 DlhSoft",title:"Data HTML Controls",description:"Data related HTML client components"});DlhSoft.buildReleaseDate=function(l,g,t){l=new Date(l,g-1,t);return l>DlhSoft.buildReleaseDate?l:DlhSoft.buildReleaseDate}(2015,5,8);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var l=_0x5c25[1],g=_0x5c25[2],t=[],u=[],A=_0x5c25[3],z=function(v,o){if(typeof v!==g||typeof o!==g)return!1;if(o==A)return!0;var r=o[_0x5c25[11]](_0x5c25[10]);if(0<=r){var q=o[_0x5c25[12]](0,r),j,s=q[_0x5c25[11]](_0x5c25[10]);if(0<=s)try{j=new Date(parseInt(q[_0x5c25[12]](s+1)))}catch(k){}typeof j===l&&(j=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>j)return!1;q=q+_0x5c25[10]+v;for(i=j=0;ij&&(j=Math[_0x5c25[15]](2,32)-j);q=j.toString(16)[_0x5c25[16]]();r=o[_0x5c25[12]](r+1);if(q==r)return!0}return!1},x=function(g,o,r,q,j){var s=_0x5c25[17],k=_0x5c25[18],p=typeof ComponentSource===l||!ComponentSource?k+_0x5c25[19]+q+_0x5c25[20]+j:_0x5c25[21],c=q+_0x5c25[22]+j+_0x5c25[23],a=_0x5c25[24],b=_0x5c25[25],d=_0x5c25[26];setTimeout(function(){var f=g[_0x5c25[27]],e=f[_0x5c25[29]](_0x5c25[28]);e[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var h=f[_0x5c25[29]](_0x5c25[28]);h[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);h[_0x5c25[35]](m);m[_0x5c25[35]](f[_0x5c25[36]](s));h[_0x5c25[35]](f[_0x5c25[36]](a+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](o));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](b+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](c));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](d+ +_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);n[_0x5c25[32]](_0x5c25[41],p);n[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[44]));m[_0x5c25[35]](n);n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);n[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[47]));n[_0x5c25[50]](_0x5c25[48],function(){g[_0x5c25[49]](e);u[_0x5c25[7]](r)}, +!1);m[_0x5c25[35]](n);h[_0x5c25[35]](m);e[_0x5c25[35]](h);g[_0x5c25[35]](e)},0);setTimeout(function(){alert(s+_0x5c25[51]+a+_0x5c25[52]+o+_0x5c25[51]+b+_0x5c25[53]+c+_0x5c25[51]+d+_0x5c25[4])},6E5)};return{setLicense:function(g,l){t[_0x5c25[7]]({type:g,content:l})},validate:function(v,o,r,q,j,s,k){for(var o=o+_0x5c25[4]+r,p=0;pDlhSoft.buildReleaseDate?l:DlhSoft.buildReleaseDate}(2015,5,8);_0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var l=_0x5c25[1],g=_0x5c25[2],t=[],u=[],A=_0x5c25[3],z=function(v,o){if(typeof v!==g||typeof o!==g)return!1;if(o==A)return!0;var r=o[_0x5c25[11]](_0x5c25[10]);if(0<=r){var q=o[_0x5c25[12]](0,r),j,s=q[_0x5c25[11]](_0x5c25[10]);if(0<=s)try{j=new Date(parseInt(q[_0x5c25[12]](s+1)))}catch(k){}typeof j===l&&(j=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>j)return!1;q=q+_0x5c25[10]+v;for(i=j=0;ij&&(j=Math[_0x5c25[15]](2,32)-j);q=j.toString(16)[_0x5c25[16]]();r=o[_0x5c25[12]](r+1);if(q==r)return!0}return!1},x=function(g,o,r,q,j){var s=_0x5c25[17],k=_0x5c25[18],p=typeof ComponentSource===l||!ComponentSource?k+_0x5c25[19]+q+_0x5c25[20]+j:_0x5c25[21],c=q+_0x5c25[22]+j+_0x5c25[23],a=_0x5c25[24],b=_0x5c25[25],d=_0x5c25[26];setTimeout(function(){var f=g[_0x5c25[27]],e=f[_0x5c25[29]](_0x5c25[28]);e[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var h=f[_0x5c25[29]](_0x5c25[28]);h[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);h[_0x5c25[35]](m);m[_0x5c25[35]](f[_0x5c25[36]](s));h[_0x5c25[35]](f[_0x5c25[36]](a+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](o));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](b+_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](f[_0x5c25[36]](c));h[_0x5c25[35]](m);h[_0x5c25[35]](f[_0x5c25[36]](d+ +_0x5c25[10]));m=f[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);n[_0x5c25[32]](_0x5c25[41],p);n[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[44]));m[_0x5c25[35]](n);n=f[_0x5c25[29]](_0x5c25[39]);n[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);n[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);n[_0x5c25[35]](f[_0x5c25[36]](_0x5c25[47]));n[_0x5c25[50]](_0x5c25[48],function(){g[_0x5c25[49]](e);u[_0x5c25[7]](r)}, +!1);m[_0x5c25[35]](n);h[_0x5c25[35]](m);e[_0x5c25[35]](h);g[_0x5c25[35]](e)},0);setTimeout(function(){alert(s+_0x5c25[51]+a+_0x5c25[52]+o+_0x5c25[51]+b+_0x5c25[53]+c+_0x5c25[51]+d+_0x5c25[4])},6E5)};return{setLicense:function(g,l){t[_0x5c25[7]]({type:g,content:l})},validate:function(v,o,r,q,j,s,k){for(var o=o+_0x5c25[4]+r,p=0;p=a.rows&&(a.rows=1);"undefined"=== +typeof a.columns?a.columns=3:0>=a.columns&&(a.columns=1);"undefined"===typeof a.headerProvider&&(a.headerProvider=function(b,d){return b.createTextNode(d!=null?d.toString()+" - "+(d+a.rows*a.columns-1).toString():"?")});"undefined"===typeof a.headerStyle&&(a.headerStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default"); +"undefined"===typeof a.timeStyle&&(a.timeStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; min-width: "+Math.max(128/a.columns,64)+"px; height: "+Math.max(80/a.rows,20)+"px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.selectedTimeStyle&&(a.selectedTimeStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"=== +typeof a.timeFormatter&&(a.timeFormatter=function(a){return a.toString()});"undefined"===typeof a.invertMatrix&&(a.invertMatrix=!1);"undefined"===typeof a.minValue&&(a.minValue=0);"undefined"===typeof a.scrollingHeight&&(a.scrollingHeight="auto")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0a.monthRows&&(a.monthRows=1);"undefined"===typeof a.monthColumns&&(a.monthColumns=1);1>a.monthColumns&&(a.monthColumns=1);"undefined"===typeof a.monthCellSpacing&&(a.monthCellSpacing="0");"undefined"=== +typeof a.applyMonthStyleForSingleCell&&(a.applyMonthStyleForSingleCell=!1);"undefined"===typeof a.applyNextMonthButtonToLastColumn&&(a.applyNextMonthButtonToLastColumn=!0);"undefined"===typeof a.applyNextMonthButtonToLastRow&&(a.applyNextMonthButtonToLastRow=!1);"undefined"===typeof a.containerStyle&&(a.containerStyle=("Modern"==a.theme?"":"border: 1px solid #707070; ")+"font-family: Arial"+("undefined"===typeof a.monthCellStyle&&(1=c.dayDuration&&(h=c.subtractDay(h));f=h;for(var m=0;mthis.settings.calendarSelectorLevels|| +0a.settings.calendarSelectorLevels)return c;var e=b.createElement("a");e.setAttribute("href","javascript://");e.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit"); +e.appendChild(c);var h=b.createElement("div");h.setAttribute("style","display: none; position: absolute; margin-left: -10px");e.appendChild(h);var m=b.createElement("div");m.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass&&m.setAttribute("class",a.settings.calendarSelectorPopupClass);h.appendChild(m);e.onclick=function(b){if((b.target||b.srcElement)==e){if("none"!=h.style.display)h.style.display="none";else{var c=Math.floor(d/12)-1;h.style.display= +"block";var g=z.initialize(m,c,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(b,d){var c=b.createTextNode((d+1).toString()+" - "+(d+10).toString());if(3>a.settings.calendarSelectorLevels)return c;var e=b.createElement("a");e.setAttribute("href","javascript://");e.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");e.appendChild(c);var f=b.createElement("div");f.setAttribute("style","display: none; position: absolute; margin-left: -10px"); +e.appendChild(f);var h=b.createElement("div");h.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass&&h.setAttribute("class",a.settings.calendarSelectorPopupClass);f.appendChild(h);e.onclick=function(a){if((a.target||a.srcElement)==e){if("none"!=f.style.display)f.style.display="none";else{var b=Math.floor(d/10);f.style.display="block";z.initialize(h,b,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(a,b){return a.createTextNode((10*b+1).toString()+ +" - "+(10*(b+10)).toString())},timeFormatter:function(a){return(10*a+1).toString()+"-"+(10*a+10).toString().substr((10*a+10).toString().length-2)},minValue:10},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.").settings.selectedTimeChangeHandler=function(a){g.setDisplayedValue(10*a)}}a.stopPropagation()}};return e},timeFormatter:function(a){return(a+1).toString()},minValue:100},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); +g.settings.selectedTimeChangeHandler=function(a){f.setDisplayedValue(12*(a+1))}}b.stopPropagation()}};return e},timeFormatter:function(b){return a.settings.months[b-12*Math.floor(b/12)]},minValue:1212};q.style.display="block";var f=z.initialize(s,d,c,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");f.settings.selectedTimeChangeHandler=function(b){a.setDisplayedValue(new Date(Math.floor(b/12),b-12*Math.floor(b/ +12),1))}}b.stopPropagation()}}}l.appendChild(j);e.appendChild(l);l=b.createElement("td");l.setAttribute("style","text-align: right; padding-right: 4px");if((!this.settings.applyNextMonthButtonToLastRow?0==m:m==this.settings.monthRows-1)&&(this.settings.applyNextMonthButtonToLastColumn?g==this.settings.monthColumns-1:0==g))j=b.createElement("a"),j.setAttribute("href","javascript://"),j.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme?"10px":"x-small")+ +"; cursor: pointer"),j.appendChild(b.createTextNode("\u25ba")),j.onclick=function(b){for(var d=h;d.getMonth()==h.getMonth();)d=c.addDay(d);a.setDisplayedValue(d);b.stopPropagation()},l.appendChild(j);e.appendChild(l);k.appendChild(e);l=b.createElement("tr");for(e=0;7>e;e++)j=b.createElement("td"),j.setAttribute("style",this.settings.dayOfWeekHeaderStyle),j.setAttribute("class",this.settings.dayOfWeekHeaderClass),j.appendChild(b.createTextNode(this.settings.daysOfWeek[e])),l.appendChild(j);k.appendChild(l); +l=null!=this.selectedDate?c.getDate(this.selectedDate):null;null!=l&&this.settings.defaultTimeOfDay>=c.dayDuration&&(l=c.subtractDay(l));j=f.getMonth();e=c.getFirstDayOfMonth(f);p=c.getPreviousWeekStart(e);for(f=0;6>f;f++){var r=b.createElement("tr");for(e=0;7>e;e++){var t=b.createElement("td");t.setAttribute("style",this.settings.dayStyle);t.setAttribute("class",this.settings.dayClass);var u=p.getDate().toString(),w=b.createElement("span");t.appendChild(w);var v=b.createElement("span");w.appendChild(v); +var B="undefined"!==typeof this.settings.disabledDateSelector&&this.settings.disabledDateSelector(p),x=p.getMonth()==j,y=b.createElement("a");y.setAttribute("href","javascript://");y.setAttribute("style","text-decoration: none; display: inline-block; cursor: "+(this.settings.isReadOnly||B||!x&&(this.settings.allowRangeSelection||this.settings.allowMultipleSelection)?"default":"pointer")+"; color: inherit; width: 20px");y.appendChild(b.createTextNode(u));v.appendChild(y);if(B)w.setAttribute("style", +this.settings.disabledDayStyle),w.setAttribute("class",this.settings.disabledDayClass);else if(x){if(u=l&&Math.abs(p.valueOf()-l.valueOf())<=c.hourDuration||this.isValueSelected(p))w.setAttribute("style",this.settings.selectedDayStyle),w.setAttribute("class",this.settings.selectedDayClass);this.settings.highlightingStyleSelector&&(w=this.settings.highlightingStyleSelector(p,u))&&v.setAttribute("style",w);this.settings.highlightingClassSelector&&(w=this.settings.highlightingClassSelector(p,u))&&v.setAttribute("class", +w)}else v.setAttribute("style",this.settings.otherMonthDayStyle),v.setAttribute("class",this.settings.otherMonthDayClass);!this.settings.isReadOnly&&!B&&(y.value=c.addTimeOfDay(p,this.settings.defaultTimeOfDay),!this.settings.allowMultipleSelection&&!this.settings.allowRangeSelection?y.onclick=function(b){var d=b.currentTarget.value;a.setDisplayedValue(d);a.setValue(d);b.stopPropagation()}:this.settings.allowRangeSelection?x&&(y.onmousedown=function(b){var d=b.currentTarget.value;a.draggingFromDate= +d;a.setValue(d);b.preventDefault()},y.onmouseover=function(b){if(a.draggingFromDate&&(b=b.currentTarget.value,!a.draggingToDate||b.valueOf()!=a.draggingToDate.valueOf()))a.draggingToDate=b,a.setValueRange({start:a.draggingFromDate,finish:a.draggingToDate})}):x&&(y.onclick=function(b){a.invertValueSelection(b.currentTarget.value);b.stopPropagation()}));r.appendChild(t);p=c.addDay(p)}k.appendChild(r)}f=p}}!this.settings.isReadOnly&&this.settings.isTodayLinkVisible&&(m=b.createElement("tr"),n=b.createElement("td"), +n.colSpan=7,n.setAttribute("style",this.settings.todayLinkStyle),n.setAttribute("class",this.settings.todayLinkClass),g=b.createElement("a"),g.setAttribute("href","javascript://"),g.setAttribute("style","text-decoration: none; color: inherit; cursor: pointer"),g.appendChild(b.createTextNode(this.settings.todayString)),n.appendChild(g),g.value=c.addTimeOfDay(c.getDate(new Date),this.settings.defaultTimeOfDay),g.onclick=function(b){var d=b.currentTarget.value;a.setDisplayedValue(d);a.setValue(d);b.stopPropagation()}, +m.appendChild(n),d.appendChild(m));this.host.appendChild(d);this.isInitialized||b.addEventListener("mouseup",function(){a.draggingToDate&&delete a.draggingToDate;a.draggingFromDate&&delete a.draggingFromDate},!0)};c.prototype.getValue=function(){return this.selectedDate};c.prototype.setValue=function(a){null!=a&&a6.5*c.dayDuration)for(b=0;7>b;b++)a=c.addDay(a);return a};c.addDay=function(a){var b=a.getTimezoneOffset()*c.minuteDuration,a=new Date(a.valueOf()-b+c.dayDuration),b=a.getTimezoneOffset()*c.minuteDuration;return new Date(a.valueOf()+b)};c.subtractDay=function(a){return c.getDate(new Date(a.valueOf()-c.dayDuration))};c.addTimeOfDay=function(a,b){var d= +a.getTimezoneOffset()*c.minuteDuration,a=new Date(a.valueOf()-d+b),d=a.getTimezoneOffset()*c.minuteDuration;return new Date(a.valueOf()+d)};c.getFirstDayOfMonth=function(a){for(a=c.getDate(a);1a.popupElement.ownerDocument.documentElement.clientHeight&&b.top>=d.height&&(a.popupElement.style.top=b.top-d.height+2+"px");d.right>a.popupElement.ownerDocument.documentElement.clientWidth&& +a.popupElement.ownerDocument.documentElement.clientWidth>=d.width&&(a.popupElement.style.left=a.popupElement.ownerDocument.documentElement.clientWidth-d.width+"px")};b();this.isOpen&&this.settings.dropDownOpenedHandler?this.settings.dropDownOpenedHandler():!this.isOpen&&this.settings.dropDownClosedHandler&&this.settings.dropDownClosedHandler();if(this.isOpen){var d=this.host.ownerDocument.documentElement.clientWidth,c=this.host.ownerDocument.documentElement.clientHeight,e=this.host.getBoundingClientRect(); +this.positionChangeHandlerTimer=setInterval(function(){var h=a.host.ownerDocument.documentElement.clientWidth,m=a.host.ownerDocument.documentElement.clientHeight,g=a.host.getBoundingClientRect();h!=d||m!=c?a.closeDropDown():(g.left!=e.left||g.top!=e.top||g.width!=e.width||g.height!=e.height)&&b();d=h;c=m;e=g},100)}else this.positionChangeHandlerTimer&&(clearInterval(this.positionChangeHandlerTimer),delete this.positionChangeHandlerTimer)};return c}();g.Element=j})(v=g.DatePicker||(g.DatePicker={})); +var o;(function(g){var j=function(){function c(a,b,d,f,e){this.host=a;this.selectedTime=b;this.header=d;this.settings=f;this.isInitialized=!1;var h="DlhSoft.Controls CalendarDay DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component=this;"undefined"===typeof f&&(f={});"undefined"!==typeof d&&"undefined"===typeof f.header&&(f.header=d);this.settings=f;c.initializeSettings(this.settings);"undefined"===typeof b&&(a=new Date,b=(new Date(a.valueOf()- +a.getTimezoneOffset()*c.minuteDuration)).getTime(),b-=Math.floor(b/c.dayDuration)*c.dayDuration);this.selectedTime=b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.isNowLinkVisible&&(a.isNowLinkVisible=!1);"undefined"===typeof a.header&&(a.header="Time of day");"undefined"===typeof a.isHeaderVisible&&(a.isHeaderVisible=!0);"undefined"===typeof a.headerStyle&& +(a.headerStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.timeStyle&&(a.timeStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; min-width: 24px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+ +("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.selectedTimeStyle&&(a.selectedTimeStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"===typeof a.disabledTimeStyle&&(a.disabledTimeStyle="color: "+("Modern"==a.theme?"#c0c0c0":"Silver"));"undefined"===typeof a.nowLinkStyle&&(a.nowLinkStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; padding: 4px; border-top: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")+"; font-size: "+("Modern"==a.theme?"12px":"small")+ +"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.nowString&&(a.nowString="Now");"undefined"===typeof a.hourDivisions?a.hourDivisions=2:0>=a.hourDivisions&&(a.hourDivisions=1);"undefined"===typeof a.timeFormatter&&(a.timeFormatter=function(a){var d=Math.floor(a/c.hourDuration),a=Math.floor((a-d*c.hourDuration)/c.minuteDuration),f=function(a,b){b===void 0&&(b=2);for(var d=a.toString();d.length< +b;)d="0"+d;return d};return f(d)+":"+f(a)});"undefined"===typeof a.hourColumns?a.hourColumns=4:0>=a.hourColumns&&(a.hourColumns=1);"undefined"===typeof a.scrollingHeight&&(a.scrollingHeight="auto")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0d&&(d=new Date,d=(new Date(d.valueOf()-d.getTimezoneOffset()*c.minuteDuration)).getTime(),d-=Math.floor(d/c.dayDuration)*c.dayDuration);a.setValue(d);b.stopPropagation()}, +q.appendChild(f),d.appendChild(q));this.host.appendChild(d)};c.prototype.getValue=function(){return this.selectedTime};c.prototype.setValue=function(a){null!=a&&0>a&&(a=0);if(a!=this.selectedTime||this.settings.forceSetOnClick)this.selectedTime=a,this.refresh(),this.settings.selectedTimeChangeHandler&&this.settings.selectedTimeChangeHandler(a)};c.getTime=function(a,b){var d=c.hourDuration/b;return Math.floor(a/d)*d};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration; +c.dayDuration=24*c.hourDuration;return c}();g.Element=j})(o=g.CalendarDay||(g.CalendarDay={}));var r;(function(g){g.initialize=function(c,a,b,d,f){return new j(c,a,b,d,f)};g.get=function(c){return c.component};var j=function(){function c(a,b,d,f,e){this.host=a;this.value=b;this.header=d;this.settings=f;this.isInitialized=!1;this.dropDownButtonElement=null;var h="DlhSoft.Controls TimePicker DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component= +this;"undefined"===typeof f&&(f={});"undefined"!==typeof d&&"undefined"===typeof f.header&&(f.header=d);this.settings=f;c.initializeSettings(this.settings);d=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null){if(null==b)try{b=this.settings.timeParser(this.inputHost.value)}catch(m){}a=d.createElement("span");this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost);this.host=a;l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component= +this}"undefined"===typeof b&&(f.isNullValueAccepted?b=null:(b=new Date,b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime(),b-=Math.floor(b/c.dayDuration)*c.dayDuration));this.value=b;this.refresh();this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.isNowLinkVisible&&(a.isNowLinkVisible=!0);"undefined"===typeof a.timeFormatter&&(a.timeFormatter=function(b){if(b==null&&a.isNullValueAccepted)return"";var d=Math.floor(b/c.hourDuration),b=Math.floor((b- +d*c.hourDuration)/c.minuteDuration),f=function(a,b){b===void 0&&(b=2);for(var d=a.toString();d.length=0&&(b=b.substr(d+1));b=new Date("01/01/1970 "+b);if(isNaN(b.valueOf())|| +b.getFullYear()<=0||b.getFullYear()!=1970||b.getMonth()!=0||b.getDate()!=1){b=new Date;b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime();return b=b-Math.floor(b/c.dayDuration)*c.dayDuration}return b.getTime()-b.getTimezoneOffset()*c.minuteDuration});"undefined"===typeof a.isNullValueAccepted&&(a.isNullValueAccepted=!0);"undefined"===typeof a.isDropDownButtonVisible&&(a.isDropDownButtonVisible=!1);"undefined"===typeof a.dropDownButtonDefinition&&(a.dropDownButtonDefinition= +"");"undefined"===typeof a.popupStyle&&(a.popupStyle="background-color: White; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+ +"; font-family: Arial");"undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px");"undefined"===typeof a.defaultPrefix&&(a.defaultPrefix="")};c.prototype.refresh=function(){for(var a=this,b=this.host.ownerDocument,d=this.host.childNodes.length;0=a.scrollTop&&0= +a.scrollHeight-a.clientHeight-1&&0>b))d=!0;if(a==this.popupElement)return d;a=a.parentElement}return!1};c.prototype.getValue=function(){return this.value};c.prototype.setValue=function(a){this.resetValue(a)};c.prototype.refreshValue=function(){this.resetValue()};c.prototype.resetValue=function(a){if(!this.isDuringInternalSetValue){this.isDuringInternalSetValue=!0;this.closeDropDown();var b=this.value;try{this.value=null!=a?a:this.settings.timeParser(this.inputElement.value)}catch(d){}this.settings.disabledTimeSelector&& +(null!=this.value&&this.settings.disabledTimeSelector(this.value))&&(this.settings.isNullValueAccepted?this.value=null:(a=new Date,this.value=(new Date(a.valueOf()-a.getTimezoneOffset()*c.minuteDuration)).getTime(),this.value-=Math.floor(this.value/c.dayDuration)*c.dayDuration));a=this.inputElement.value?this.inputElement.value.lastIndexOf(" "):-1;a=0<=a?this.inputElement.value.substr(0,a):this.settings.defaultPrefix;0a.popupElement.ownerDocument.documentElement.clientHeight&&b.top>=d.height&&(a.popupElement.style.top=b.top-d.height+2+"px");d.right>a.popupElement.ownerDocument.documentElement.clientWidth&&a.popupElement.ownerDocument.documentElement.clientWidth>=d.width&&(a.popupElement.style.left=a.popupElement.ownerDocument.documentElement.clientWidth-d.width+"px")};b();this.isOpen&&this.settings.dropDownOpenedHandler?this.settings.dropDownOpenedHandler():!this.isOpen&&this.settings.dropDownClosedHandler&& +this.settings.dropDownClosedHandler();if(this.isOpen){this.calendarDay.selectedElement&&this.calendarDay.selectedElement.scrollIntoView();var d=this.host.ownerDocument.documentElement.clientWidth,c=this.host.ownerDocument.documentElement.clientHeight,e=this.host.getBoundingClientRect();this.positionChangeHandlerTimer=setInterval(function(){var h=a.host.ownerDocument.documentElement.clientWidth,g=a.host.ownerDocument.documentElement.clientHeight,k=a.host.getBoundingClientRect();h!=d||g!=c?a.closeDropDown(): +(k.left!=e.left||k.top!=e.top||k.width!=e.width||k.height!=e.height)&&b();d=h;c=g;e=k},100)}else this.positionChangeHandlerTimer&&(clearInterval(this.positionChangeHandlerTimer),delete this.positionChangeHandlerTimer)};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration;c.dayDuration=24*c.hourDuration;return c}();g.Element=j})(r=g.TimePicker||(g.TimePicker={}));(function(g){g.initialize=function(c,a,b,d){return new j(c,a,b,d)};g.get=function(c){return c["DateTimePicker.component"]}; +var j=function(){function c(a,b,d,f){var e=this;this.host=a;this.value=b;this.settings=d;this.isInitialized=!1;this.host["DateTimePicker.component"]=this;"undefined"===typeof d&&(d={});"undefined"!==typeof d.license&&"undefined"!==typeof d.datePickerSettings&&(d.datePickerSettings.license=d.license);this.settings=d;c.initializeSettings(this.settings);"undefined"===typeof b&&(b=d.datePickerSettings.isNullValueAccepted?null:new Date);this.value=b;this.timePicker=r.initialize(a,void 0,void 0,this.settings.timePickerSettings, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");this.inputElement=this.timePicker.inputElement;this.inputElement["DateTimePicker.component"]=this;this.datePicker=v.initialize(this.inputElement,this.value,this.settings.datePickerSettings,f);this.value=this.datePicker.value;var h;try{h=b?this.datePicker.settings.dateTimeFormatter(b):""}catch(g){h=""}a=h.lastIndexOf(" ");0<=a&&(h=h.substr(0,a));this.timePicker.settings.defaultPrefix= +h;var k=this.datePicker.settings.dropDownOpenedHandler;this.datePicker.settings.dropDownOpenedHandler=function(){e.datePicker.isOpen&&e.timePicker.isOpen&&e.timePicker.closeDropDown();e.isOpen=e.datePicker.isOpen;k&&k()};var j=this.datePicker.settings.dropDownClosedHandler;this.datePicker.settings.dropDownClosedHandler=function(){e.isOpen=e.datePicker.isOpen;j&&j()};var l=this.timePicker.settings.dropDownOpenedHandler;this.timePicker.settings.dropDownOpenedHandler=function(){e.timePicker.isOpen&& +!e.value?e.timePicker.closeDropDown():(e.timePicker.isOpen&&e.datePicker.isOpen&&e.datePicker.closeDropDown(),e.isTimeOpen=e.timePicker.isOpen,l&&l())};var p=this.timePicker.settings.dropDownClosedHandler;this.timePicker.settings.dropDownClosedHandler=function(){e.isTimeOpen=e.timePicker.isOpen;p&&p()};var o=this.datePicker.settings.valueChangeHandler;this.datePicker.settings.valueChangeHandler=function(a){e.value=a;o&&o(a)};this.inputElement&&(this.inputElement.addEventListener("focus",function(){if(e.settings.openDropDownOnInputClick){switch(e.getCurrentValuePart()){default:e.openDropDown(); +break;case "Time":e.timePicker.refreshValue(),e.openTimeDropDown()}e.focusValue=e.inputElement.value}},!0),this.inputElement.addEventListener("blur",function(){e.settings.openDropDownOnInputClick&&"undefined"!==typeof e.focusValue&&delete e.focusValue},!0),this.inputElement.addEventListener("keydown",function(a){13==a.keyCode?e.settings.openDropDownOnInputClick&&e.refreshValue():e.closeDropDown()},!0),this.inputElement.addEventListener("mousedown",function(){setTimeout(function(){if(e.settings.openDropDownOnInputClick&& +!("undefined"!==typeof e.focusValue&&e.inputElement.value!=e.focusValue))switch(e.getCurrentValuePart()){default:e.datePicker.refreshValue();e.openDropDown();break;case "Time":e.timePicker.refreshValue(),e.openTimeDropDown()}},0)},!0));this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.isNullValueAccepted&&(a.isNullValueAccepted=!0);"undefined"===typeof a.openDropDownOnInputClick&& +(a.openDropDownOnInputClick=!0);"undefined"===typeof a.datePickerSettings&&(a.datePickerSettings={});a.datePickerSettings.isReadOnly=a.isReadOnly;a.datePickerSettings.theme=a.theme;"undefined"===typeof a.datePickerSettings.isTodayLinkVisible&&(a.datePickerSettings.isTodayLinkVisible=a.areCurrentLinksVisible);"undefined"===typeof a.datePickerSettings.defaultTimeOfDay&&(a.datePickerSettings.defaultTimeOfDay=a.defaultTimeOfDay);a.datePickerSettings.openDropDownOnInputClick=!1;"undefined"===typeof a.datePickerSettings.isDropDownButtonVisible&& +(a.datePickerSettings.isDropDownButtonVisible=a.areDropDownButtonsVisible);a.datePickerSettings.allowMultipleSelection=!1;a.datePickerSettings.allowRangeSelection=!1;"undefined"===typeof a.datePickerSettings.dateTimeFormatter&&(a.datePickerSettings.dateTimeFormatter=a.dateTimeFormatter);"undefined"===typeof a.datePickerSettings.dateTimeParser&&(a.datePickerSettings.dateTimeParser=a.dateTimeParser);a.datePickerSettings.isNullValueAccepted=a.isNullValueAccepted;"undefined"===typeof a.datePickerSettings.valueChangeHandler&& +(a.datePickerSettings.valueChangeHandler=a.valueChangeHandler);"undefined"===typeof a.datePickerSettings.popupClass&&(a.datePickerSettings.popupClass=a.popupClass);"undefined"===typeof a.datePickerSettings.popupStyle&&(a.datePickerSettings.popupStyle=a.popupStyle);"undefined"===typeof a.datePickerSettings.inputClass&&(a.datePickerSettings.inputClass=a.inputClass);"undefined"===typeof a.datePickerSettings.inputStyle&&(a.datePickerSettings.inputStyle=a.inputStyle);"undefined"===typeof a.datePickerSettings.disabledDateSelector&& +(a.datePickerSettings.disabledDateSelector=a.disabledDateSelector);"undefined"===typeof a.datePickerSettings.calendarSelectorLevels&&(a.datePickerSettings.calendarSelectorLevels=a.calendarSelectorLevels);"undefined"===typeof a.datePickerSettings.months&&(a.datePickerSettings.months=a.months);"undefined"===typeof a.datePickerSettings.daysOfWeek&&(a.datePickerSettings.daysOfWeek=a.daysOfWeek);"undefined"===typeof a.timePickerSettings&&(a.timePickerSettings={});a.timePickerSettings.theme=a.theme;a.timePickerSettings.isReadOnly= +a.isReadOnly;"undefined"===typeof a.timePickerSettings.isNowLinkVisible&&(a.timePickerSettings.isNowLinkVisible=a.areCurrentLinksVisible);"undefined"===typeof a.timePickerSettings.nowString&&(a.timePickerSettings.nowString="Current");a.timePickerSettings.openDropDownOnInputClick=!1;"undefined"===typeof a.timePickerSettings.isDropDownButtonVisible&&(a.timePickerSettings.isDropDownButtonVisible=a.areDropDownButtonsVisible);"undefined"===typeof a.timePickerSettings.timeFormatter&&"undefined"!==typeof a.datePickerSettings.dateTimeFormatter&& +(a.timePickerSettings.timeFormatter=function(b){var c=new Date(1970,0,1),b=b!=null?a.datePickerSettings.dateTimeFormatter(new Date(c.valueOf()+b)):"",c=b.lastIndexOf(" ");return c<0?"":b.substr(c+1)});"undefined"===typeof a.timePickerSettings.timeParser&&("undefined"!==typeof a.datePickerSettings.dateTimeParser&&"undefined"!==typeof a.datePickerSettings.dateTimeFormatter)&&(a.timePickerSettings.timeParser=function(b){var f=b.lastIndexOf(" ");if(f<0){if(a.isNullValueAccepted)return null;b=new Date; +b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime();return b-Math.floor(b/c.dayDuration)*c.dayDuration}var b=b.substr(f+1),e=a.datePickerSettings.dateTimeFormatter(new Date(1970,0,1)),f=e.indexOf(" ");f>=0&&(e=e.substr(0,f+1));b=a.datePickerSettings.dateTimeParser(e+b);if(isNaN(b.valueOf())||b.getFullYear()<=0||b.getFullYear()!=1970||b.getMonth()!=0||b.getDate()!=1){b=new Date;b=(new Date(b.valueOf()-b.getTimezoneOffset()*c.minuteDuration)).getTime();return b=b-Math.floor(b/ +c.dayDuration)*c.dayDuration}return b.getTime()-b.getTimezoneOffset()*c.minuteDuration});a.timePickerSettings.isNullValueAccepted=a.isNullValueAccepted;if("undefined"!==typeof a.timePickerSettings.disabledTimeSelector){var b=a.datePickerSettings.disabledDateSelector;a.datePickerSettings.disabledDateSelector=function(d){var f=false;b&&(f=b(d));if(f)return true;d=(new Date(d.valueOf()-d.getTimezoneOffset()*c.minuteDuration)).getTime();d=d-Math.floor(d/c.dayDuration)*c.dayDuration;return a.timePickerSettings.disabledTimeSelector(d)}}"undefined"=== +typeof a.timePickerSettings.popupClass&&(a.timePickerSettings.popupClass=a.popupClass);"undefined"===typeof a.timePickerSettings.popupStyle&&(a.timePickerSettings.popupStyle=a.popupStyle);a.timePickerSettings.inputClass=void 0;a.timePickerSettings.inputStyle=null;"undefined"===typeof a.timePickerSettings.disabledTimeSelector&&(a.timePickerSettings.disabledTimeSelector=a.disabledTimeSelector)};c.prototype.refreshValue=function(){this.datePicker.refreshValue();this.timePicker.refreshValue()};c.prototype.getValue= +function(){return this.datePicker.getValue()};c.prototype.setValue=function(a){this.datePicker.setValue(a)};c.prototype.getTimeValue=function(){return this.timePicker.getValue()};c.prototype.setTimeValue=function(a){this.timePicker.setValue(a)};c.prototype.openDropDown=function(){this.datePicker.openDropDown()};c.prototype.closeDropDown=function(){this.datePicker.closeDropDown()};c.prototype.openTimeDropDown=function(){this.timePicker.openDropDown()};c.prototype.closeTimeDropDown=function(){this.timePicker.closeDropDown()}; +c.prototype.getCurrentValuePart=function(){if(!this.inputElement||!this.inputElement.value)return null;var a=this.inputElement.value.lastIndexOf(" ");return 0>a?"Date":this.inputElement.selectionStart>a?"Time":"Date"};c.secondDuration=1E3;c.minuteDuration=60*c.secondDuration;c.hourDuration=60*c.minuteDuration;c.dayDuration=24*c.hourDuration;return c}();g.Element=j})(g.DateTimePicker||(g.DateTimePicker={}));var q;(function(g){g.initialize=function(c,a,b,d,f){return new p(c,a,b,d,f)};g.get=function(c){return c.component}; +var p=function(){function c(a,b,d,f,e){this.host=a;this.availableChoices=b;this.value=d;this.settings=f;this.isInitialized=!1;this.dropDownButtonElement=null;var h="DlhSoft.Controls MultiSelectorComboBox DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f);this.host.component=this;"undefined"===typeof f&&(f={});this.settings=f;c.initializeSettings(this.settings);"undefined"===typeof this.settings.choiceStyle&&!(this instanceof j.Element)&&(this.settings.choiceStyle= +"cursor: pointer");var g=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null)null==d&&(d=this.inputHost.value),a=g.createElement("span"),this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost),this.host=a,l[h[5]][h[4]](a,h[0],h[1],h[2],h[3],e,f),this.host.component=this;if("undefined"===typeof b||null==b)b=[];this.availableChoices=b;if("undefined"===typeof d||null==d)d="";this.value=d;this.refresh();this.isInitialized=!0}c.initializeSettings= +function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.autoAppendAvailableChoices&&(a.autoAppendAvailableChoices=!1);"undefined"===typeof a.openDropDownOnInputClick&&(a.openDropDownOnInputClick=!0);"undefined"===typeof a.isDropDownButtonVisible&&(a.isDropDownButtonVisible=!1);"undefined"===typeof a.dropDownButtonDefinition&&(a.dropDownButtonDefinition="\u25bc");"undefined"===typeof a.separator&&(a.separator=",");"undefined"===typeof a.isSpaceSeparated&&(a.isSpaceSeparated=!0);"undefined"===typeof a.delimiters&&(a.delimiters=["["]);"undefined"===typeof a.areCheckBoxesVisible&&(a.areCheckBoxesVisible=!0);"undefined"=== +typeof a.popupStyle&&(a.popupStyle="background-color: White; color: "+("Modern"==a.theme?"#505050":"Black")+"; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small")+"; max-height: 188px; overflow-y: auto");"undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px")};c.prototype.refresh=function(){for(var a= +this,b=this.host.ownerDocument,d=this.host.childNodes.length;0=a.scrollTop&&0=a.scrollHeight-a.clientHeight-1&&0>b))d=!0;if(a==this.popupElement)return d;a=a.parentElement}return!1};c.prototype.getValue=function(){return this.value};c.prototype.setValue=function(a){this.resetValue(a)};c.prototype.refreshValue=function(){this.resetValue()};c.prototype.resetValue= +function(a){this.isDuringInternalSetValue||(this.closeDropDown(),this.setValueInternal(a))};c.prototype.setValueInternal=function(a,b){if(!this.isDuringInternalSetValue){this.isDuringInternalSetValue=!0;"undefined"===typeof b&&(b=!0);var d=this.value,c=this.value="undefined"!==typeof a&&null!=a?a:this.inputElement.value;if(c!=this.inputElement.value&&(this.inputElement.value=c,this.isInitialized))try{var e=this.inputElement.ownerDocument.createEvent("HTMLEvents");e.initEvent("change",!0,!0);this.inputElement.dispatchEvent(e)}catch(h){}if(this.value&& +!d||!this.value&&d||this.value&&d&&this.value.valueOf()!=d.valueOf())b&&this.refreshSelectedChoices(),this.settings.valueChangeHandler&&this.settings.valueChangeHandler(this.value);delete this.isDuringInternalSetValue}};c.prototype.refreshAvailableChoices=function(){if(this.settings.autoAppendAvailableChoices){for(var a=this.getSelectedChoices(!1),b=0;bthis.availableChoices.indexOf(d)&&this.availableChoices.push(d)}this.refreshSelectedChoices()}};c.prototype.getSelectedChoice= +function(a){return this.getSelectedChoices(a)[0]};c.prototype.getSelectedChoices=function(a){"undefined"===typeof a&&(a=!0);for(var b=[],d=this.value.trim(),c=d.split(this.settings.separator),e=0;e=this.availableChoices.length))){(this.isOpen=!this.isOpen)&&this.refreshAvailableChoices();var b= +function(){var b=a.inputElement.getBoundingClientRect();a.popupElement.style.position="fixed";a.popupElement.style.zIndex="1";a.popupElement.style.left=b.left+"px";a.popupElement.style.top=b.top+b.height+"px";a.popupElement.style.minWidth=a.inputElement.offsetWidth+"px";a.popupElement.style.display=a.isOpen?"block":"none";var c=a.popupElement.getBoundingClientRect();c.bottom>a.popupElement.ownerDocument.documentElement.clientHeight&&b.top>=c.height&&(a.popupElement.style.top=b.top-c.height+2+"px"); +c.right>a.popupElement.ownerDocument.documentElement.clientWidth&&a.popupElement.ownerDocument.documentElement.clientWidth>=c.width&&(a.popupElement.style.left=a.popupElement.ownerDocument.documentElement.clientWidth-c.width+"px")};b();this.isOpen&&this.settings.dropDownOpenedHandler?this.settings.dropDownOpenedHandler():!this.isOpen&&this.settings.dropDownClosedHandler&&this.settings.dropDownClosedHandler();if(this.isOpen){var c=this.host.ownerDocument.documentElement.clientWidth,f=this.host.ownerDocument.documentElement.clientHeight, +e=this.host.getBoundingClientRect();this.positionChangeHandlerTimer=setInterval(function(){var h=a.host.ownerDocument.documentElement.clientWidth,g=a.host.ownerDocument.documentElement.clientHeight,k=a.host.getBoundingClientRect();h!=c||g!=f?a.closeDropDown():(k.left!=e.left||k.top!=e.top||k.width!=e.width||k.height!=e.height)&&b();c=h;f=g;e=k},100)}else this.positionChangeHandlerTimer&&(clearInterval(this.positionChangeHandlerTimer),delete this.positionChangeHandlerTimer)}};return c}();g.Element= +p})(q=g.MultiSelectorComboBox||(g.MultiSelectorComboBox={}));var j;(function(g){g.initialize=function(c,a,b,d,f){return new j(c,a,b,d,f)};g.get=function(c){return c.component};var j=function(c){function a(a,d,f,e,h){c.call(this,a,d,f,e,h);this.isInitialized=!1;this.settings.areCheckBoxesVisible=!1;"undefined"===typeof e.choiceStyle&&(e.choiceStyle="padding: 2px; margin-right: -4px; cursor: pointer");"undefined"===typeof e.selectedChoiceStyle&&(e.selectedChoiceStyle="background-color: #3399ff; color: White; margin: -3px; padding: 2px"); +this.refresh();this.isInitialized=!0}__extends(a,c);return a}(q.Element);g.Element=j})(j=g.ComboBox||(g.ComboBox={}));var s;(function(g){g.initialize=function(c,a,b,d,f){return new l(c,a,b,d,f)};g.get=function(c){return c.component};var l=function(c){function a(){c.apply(this,arguments)}__extends(a,c);return a}(j.Element);g.Element=l})(s=g.DropDownList||(g.DropDownList={}));(function(g){g.initialize=function(c,a,b,d){return new j(c,a,b,d)};g.get=function(c){return c["ToolTip.component"]};var j=function(){function c(a, +b,d,f){var e=this;this.content=a;this.targetElement=b;this.settings=d;this.isInitialized=!1;this.isEnabled=!0;this.isVisible=!1;var b=b.ownerDocument,g=b.createElement("span");b.body.appendChild(g);var j="DlhSoft.Controls ToolTip DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");l[j[5]][j[4]](g,j[0],j[1],j[2],j[3],f,d);a&&a instanceof HTMLElement?(a.parentNode&&a.parentNode.removeChild(a),f=a):(f=b.createElement("span"),f.innerHTML=a);g.appendChild(f);this.host=g;this.contentContainer=f; +this.host["ToolTip.component"]=this;this.contentContainer["ToolTip.component"]=this;this.targetElement["ToolTip.component"]=this;"undefined"===typeof d&&(d={});this.settings=d;c.initializeSettings(this.settings);this.contentContainer.setAttribute("style",this.settings.containerStyle);this.settings.containerClass&&this.contentContainer.setAttribute("class",this.settings.containerClass);this.isEnabled=this.settings.isEnabled;(this.isVisible=this.settings.isVisible)?this.show():this.hide();this.refresh(); +var k=!1;this.targetElement.addEventListener("mouseenter",function(){if(e.isEnabled){e.show();k=true}});this.targetElement.addEventListener("mouseleave",function(){if(e.isEnabled){k=false;isNaN(e.settings.duration)||setTimeout(function(){k||e.hide()},e.settings.duration)}});this.contentContainer.addEventListener("mouseenter",function(){e.isEnabled&&(k=true)});this.contentContainer.addEventListener("mouseleave",function(){if(e.isEnabled){k=false;isNaN(e.settings.duration)||setTimeout(function(){k|| +e.hide()},e.settings.duration)}});this.targetElement.addEventListener("mouseup",function(){e.isEnabled&&e.hide()},!0);b.addEventListener("mousedown",function(){e.isEnabled&&(k||e.hide())},!0);b.addEventListener("mousewheel",function(){e.isEnabled&&e.hide()},!0);b.addEventListener("DOMMouseScroll",function(){e.isEnabled&&e.hide()},!0);this.isInitialized=!0}c.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isEnabled&&(a.isEnabled=!0);"undefined"=== +typeof a.duration&&(a.duration=0);"undefined"===typeof a.isVisible&&(a.isVisible=!1);"undefined"===typeof a.containerStyle&&(a.containerStyle="cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; background-color: "+("Modern"==a.theme?"White":"#ffffc0")+"; color: "+("Modern"==a.theme?"#505050":"Black")+"; font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small")+"; padding: 4px")}; +c.prototype.refresh=function(){var a=this.targetElement.getBoundingClientRect();this.x=a.left;this.y=a.top+a.height;this.contentContainer.style.position="fixed";this.contentContainer.style.zIndex="1";this.contentContainer.style.left=this.x+"px";this.contentContainer.style.top=this.y+"px";this.contentContainer.style.display=this.settings.isVisible?"inline-block":"none";var b=this.contentContainer.getBoundingClientRect();b.bottom>this.contentContainer.ownerDocument.documentElement.clientHeight&&a.top>= +b.height&&(this.contentContainer.style.top=a.top-b.height+2+"px");b.right>this.contentContainer.ownerDocument.documentElement.clientWidth&&this.contentContainer.ownerDocument.documentElement.clientWidth>=b.width&&(this.contentContainer.style.left=this.contentContainer.ownerDocument.documentElement.clientWidth-b.width+"px")};c.prototype.setPosition=function(a,b){this.setHorizontalPosition(a);this.setVerticalPosition(b)};c.prototype.setHorizontalPosition=function(a){this.x=a;this.contentContainer.style.left= +this.x+"px"};c.prototype.setVerticalPosition=function(a){this.y=a;this.contentContainer.style.top=this.y+"px"};c.prototype.enable=function(){this.isEnabled||(this.settings.isEnabled=this.isEnabled=!0)};c.prototype.disable=function(){this.isEnabled&&(this.settings.isEnabled=this.isEnabled=!1)};c.prototype.show=function(){c.previouslyShown&&c.previouslyShown.hide();c.previouslyShown=this;this.isVisible||(this.settings.isVisible=this.isVisible=!0,this.refresh(),this.settings.shownHandler&&this.settings.shownHandler())}; +c.prototype.hide=function(){this.isVisible&&(this.settings.isVisible=this.isVisible=!1,this.refresh(),this.settings.hiddenHandler&&this.settings.hiddenHandler())};c.prototype.setContent=function(a){a&&a instanceof HTMLElement?(a.parentNode&&a.parentNode.removeChild(a),this.host.replaceChild(a,this.contentContainer),this.contentContainer=a):this.contentContainer.innerHTML=a};return c}();g.Element=j})(g.ToolTip||(g.ToolTip={}));(function(k){function j(c,a){for(var b=g.TreeGrid.getDefaultColumns(c,a), +d=0;d +*/ + +declare module DlhSoft.Controls { + /** Represents a control that presents hierarchical data items using a tree-grid. */ + module TreeGrid { + /** + * Initializes a TreeGrid component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Node data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): Column[]; + + function getDefaultCollapsedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + function getDefaultExpandedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function optionSelectColumnTemplateBase(document: HTMLDocument, width: number, optionCollectionGetter: () => any[], valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function numberInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function percentInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function timeSpanInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, scale?: number, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function dateTimeInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function datePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function dateTimePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function multiSelectorComboBoxInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIndexColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + function getWbsColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + + /** Represents an HTML element that supplementary provides TreeGrid component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshGridItems(): void; refreshItems(): void; refreshGridItem(item: Item): void; refreshItem(item: Item): void; refreshItemPath(item: Item): void; refreshItemNeighbourhood(item: Item): void; + + insertItem(index: number, item: Item): void; addItem(item: Item): void; insertItems(index: number, items: Item[]): void; addItems(items: Item[]): void; + removeItem(item: Item): void; removeItems(items: Item[]): void; + moveRange(fromIndex: number, count: number, toIndex: number): void; + moveItem(item: Item, toIndex: number): void; + moveItemHierarchy(item: Item, toIndex: number): void; + moveItemUp(item: Item): void; moveItemDown(item: Item): void; + moveItemHierarchyUp(item: Item): void; moveItemHierarchyDown(item: Item): void; + + increaseItemIndentation(item: Item): void; decreaseItemIndentation(item: Item): void; + + setItemContent(item: Item, value: any): void; + getItemIndexString(item: Item, zeroBased?: boolean): string; + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + expandItem(item: Item): void; collapseItem(item: Item): void; + scrollToItem(item: Item): void; scrollToBottom(): void; + + getItemsHeight(): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + getRootItems(): Item[]; getLeafItems(): Item[]; + + isInitializing: boolean; isInitialized: boolean; + + /** Copies the common settings of the current component instance to the specified target settings collection; a secondary component instance may be initialized using the output collection. */ + copyCommonSettings(targetSettings: Settings): void; + } + + /** Represents a hierarchical data item and its tree-grid node representation. */ + interface Item { + /** The object that is displayed to represent the node item in the grid, usually the node name. */ + content: any; + + /** The hierarchy is based on the indentation level values of the nodes, so that a node with a lower index in the collection and having a specific indentation level will become the node for the nodes with a higher index in the collection and having an increased indentation level. */ + indentation?: number; + + /** If a parent node is expanded its child nodes become visible. If a parent node is collapsed its child nodes become invisible. */ + isExpanded?: boolean; + + isReadOnly?: boolean; + isHidden?: boolean; + isSummaryEnabled?: boolean; + + "class"?: string; style?: string; + + isSelected?: boolean; + + /** The index of the item in the managed hierarchy. */ + index?: number; + + /** The summary item that includes this node considering indentation values, or null when there is no such parent summary item. */ + parent?: Item; + + /** Indicates whether the node is a summary item. */ + hasChildren?: boolean; + + /** When this node is a summary item (i.e. hasChildren is set to true), returns an array of its child items. */ + children?: Item[]; + + /** Indicates whether the node is visible within the hierarchy, i.e. it is not a descendent of a collapsed summary item. */ + isVisible?: boolean; + + /** Indicates whether the node is visible in the scrolling viewport of the control when virtualization is enabled. */ + isVirtuallyVisible?: boolean; + } + + /** Represents settings for a TreeGrid component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the interaction mode to generically apply to the control; Standard, and TouchEnabled interaction modes are supported; by default it is Standard. */ + interaction?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + gridWidth?: string; + splitterWidth?: number; + + isReadOnly?: boolean; isContentReadOnly?: boolean; + + headerBackground?: string; headerHeight?: number; + itemHeight?: number; + + /** Collection of objects indicating the columns to be presented in the grid. */ + columns?: Column[]; + + itemClass?: string; itemStyle?: string; + standardItemClass?: string; summaryItemClass?: string; standardItemStyle?: string; summaryItemStyle?: string; + + selectedItemClass?: string; selectedItemStyle?: string; + + /** Indicates the selection behavior; support values are None (not allowed), Focus (single item selected triggered by focus), Single (single item selection using check box), Extended (multiple item selection using check boxes), and ExtendedFocus (multiple item selection using check boxes or triggered by focus); by default it is set to Focus. */ + selectionMode?: string; + + indentationLevelWidth?: number; + + cellClass?: string; cellStyle?: string; + toggleButtonClass?: string; toggleButtonHoveringClass?: string; toggleButtonStyle?: string; toggleButtonHoveringStyle?: string; + collapsedToggleButtonTemplate? (): HTMLElement; expandedToggleButtonTemplate? (): HTMLElement; + + visibilityFilter? (item: Item): boolean; + + allowUserToResizeColumns?: boolean; + minColumnWidth?: number; + maxColumnWidth?: number; + + alternativeItemClass?: string; alternativeItemStyle?: string; + + gridLines?: string; horizontalGridLines?: string; verticalGridLines?: string; + + /** Indicates whether the control will populate grid rows only when they need to be presented (such as only when scrolling the view to their positions); by default it is set to true for optimization purposes. */ + isVirtualizing?: boolean; + + /** Function called whenever the end user resizes a grid column, changing its width (column.width). */ + columnWidthChangeHandler? (column: Column, width: number): void; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control, when using the default grid columns. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + /** Function called whenever summary item expansion state changes within the control, providing the expanded or collapsed item, and a Boolean value indicating the updated expansion state, specified as parameters. */ + itemExpansionChangeHandler? (item: Item, isExpanded: boolean): void; + /** Function called whenever item selection changes within the control, providing the selected or unselected item, a Boolean value indicating the updated selection state, and a Boolean value indicating whether this change was directly triggered by the user, specified as parameters. */ + itemSelectionChangeHandler? (item: Item, isSelected: boolean, isDirect: boolean): void; + + /** Function called whenever an item is moved in the managed list of the control, providing the item, source and target positions of the item, specified as parameters. */ + itemMoveHandler? (item: Item, fromIndex: number, toIndex: number): void; + } + + /** Represents a grid column displayed by the TreeGrid component. */ + interface Column { + isTreeView?: boolean; + + header: any; + width: number; minWidth?: number; maxWidth?: number; + + isReadOnly?: boolean; allowUserToResize?: boolean; + isSelection?: boolean; + + headerClass?: string; headerStyle?: string; + cellClass?: string; cellStyle?: string; + + /** Function that returns the output (document node) to be presented within the grid cell of this column in the standard view, for a specific item received as parameter. */ + cellTemplate(item: Item): HTMLElement; + + exportCellTemplate? (item: Item): HTMLElement; + } + + /** Represents export settings for a TreeGrid component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + columnIndexes?: number[]; + startRowIndex?: number; endRowIndex?: number; + rotate?: boolean; + autoClose?: boolean; + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.HierarchicalData.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.HierarchicalData.HTML.Controls.js new file mode 100644 index 000000000..9736168c3 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.HierarchicalData.HTML.Controls.js @@ -0,0 +1,116 @@ +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.HierarchicalData.HTML.Controls",company:"DlhSoft",product:"Hierarchical Data Modern Library",version:"5.3.6.0",copyright:"Copyright \u00a9 2012-2015 DlhSoft",title:"Hierarchical Data HTML Controls",description:"Hierarchical Data related HTML client components"}); +DlhSoft.buildReleaseDate=function(y,u,A){y=new Date(y,u-1,A);return y>DlhSoft.buildReleaseDate?y:DlhSoft.buildReleaseDate}(2015,9,22);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var y=_0x5c25[1],u=_0x5c25[2],A=[],K=[],E=_0x5c25[3],G=function(x,s){if(typeof x!==u||typeof s!==u)return!1;if(s==E)return!0;var B=s[_0x5c25[11]](_0x5c25[10]);if(0<=B){var q=s[_0x5c25[12]](0,B),n,t=q[_0x5c25[11]](_0x5c25[10]);if(0<=t)try{n=new Date(parseInt(q[_0x5c25[12]](t+1)))}catch(p){}typeof n===y&&(n=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>n)return!1;q=q+_0x5c25[10]+x;for(i=n=0;in&&(n=Math[_0x5c25[15]](2,32)-n);q=n.toString(16)[_0x5c25[16]]();B=s[_0x5c25[12]](B+1);if(q==B)return!0}return!1},H=function(x,s,u,q,n){var t=_0x5c25[17],p=_0x5c25[18],z=typeof ComponentSource===y||!ComponentSource?p+_0x5c25[19]+q+_0x5c25[20]+n:_0x5c25[21],A=q+_0x5c25[22]+n+_0x5c25[23],E=_0x5c25[24],G=_0x5c25[25],H=_0x5c25[26];setTimeout(function(){var n=x[_0x5c25[27]],p=n[_0x5c25[29]](_0x5c25[28]);p[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var q=n[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);q[_0x5c25[35]](r);r[_0x5c25[35]](n[_0x5c25[36]](t));q[_0x5c25[35]](n[_0x5c25[36]](E+_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);r[_0x5c25[35]](n[_0x5c25[36]](s));q[_0x5c25[35]](r);q[_0x5c25[35]](n[_0x5c25[36]](G+_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);r[_0x5c25[35]](n[_0x5c25[36]](A));q[_0x5c25[35]](r);q[_0x5c25[35]](n[_0x5c25[36]](H+ +_0x5c25[10]));r=n[_0x5c25[29]](_0x5c25[28]);r[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var w=n[_0x5c25[29]](_0x5c25[39]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);w[_0x5c25[32]](_0x5c25[41],z);w[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);w[_0x5c25[35]](n[_0x5c25[36]](_0x5c25[44]));r[_0x5c25[35]](w);w=n[_0x5c25[29]](_0x5c25[39]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);w[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);w[_0x5c25[35]](n[_0x5c25[36]](_0x5c25[47]));w[_0x5c25[50]](_0x5c25[48],function(){x[_0x5c25[49]](p);K[_0x5c25[7]](u)}, +!1);r[_0x5c25[35]](w);q[_0x5c25[35]](r);p[_0x5c25[35]](q);x[_0x5c25[35]](p)},0);setTimeout(function(){alert(t+_0x5c25[51]+E+_0x5c25[52]+s+_0x5c25[51]+G+_0x5c25[53]+A+_0x5c25[51]+H+_0x5c25[4])},6E5)};return{setLicense:function(u,s){A[_0x5c25[7]]({type:u,content:s})},validate:function(x,s,B,q,n,t,p){for(var s=s+_0x5c25[4]+B,z=0;z0?"auto":c.itemHeight+"px";else{var e=a.clientHeight- +c.headerHeight-2;e<0&&(e=0);d=e+"px";if(e0?"auto":c.itemHeight+"px"}a.isContentHeightInitialized=true}return d},H=function(a,b){if(typeof b.toggleButtonAreaWidth!=="undefined")return b.toggleButtonAreaWidth;for(var c=0,d=0;d0){c=16;break}return b.toggleButtonAreaWidth=c},x=function(a,b){var c=a.createElement("span");c.innerHTML=b;return c},s=function(a,b){var c=a.ownerDocument,d= +c.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("style","width: 12px; height: 12px");d.setAttribute("focusable","false");c=c.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("id","PART_Border");c.setAttribute("width","12");c.setAttribute("height","12");c.setAttribute("style","fill: White; fill-opacity: 0");d.appendChild(c);a.setAttribute("id","PART_Button");typeof b.toggleButtonClass!=="undefined"&&a.setAttribute("class",b.toggleButtonClass);typeof b.toggleButtonStyle!== +"undefined"&&a.setAttribute("style",b.toggleButtonStyle);d.appendChild(a);return d},B=function(a,b){typeof b!=="object"&&(b={});A(b);var c=[{header:"",width:32,isSelection:true},{header:"Item",width:280,isTreeView:true}];c[0].cellTemplate=q(b,c[0],a);c[1].cellTemplate=z(b,c[1],a);c[1].exportCellTemplate=z(b,c[1],a,false);b.selectionMode!="Single"&&(b.selectionMode!="Extended"&&b.selectionMode!="ExtendedFocus")&&c.splice(0,1);return c},q=function(a,b,c){return function(d){return!b.isReadOnly?n(d,a, +c):getBooleanNode(d.treeGrid.ownerDocument,d.isSelected)}},n=function(a,b){var c=a.treeGrid.ownerDocument,d;if(typeof a.selectionInput==="undefined"){d=c.createElement("input");a.selectionInput=d;d.type="checkbox";d.setAttribute("style","margin: 0px")}else d=a.selectionInput;if(a.isSelected){d.setAttribute("checked","checked");if(!d.checked)d.checked=true}else if(d.checked)d.checked=false;var e=function(){d.checked?t(a,true,b.selectionMode):t(a,false,b.selectionMode)};typeof d.changeEventListener!== +"undefined"&&d.removeEventListener("change",d.changeEventListener,true);d.addEventListener("change",e,true);d.changeEventListener=e;c=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();e(a)}};typeof d.keyPressEventListener!=="undefined"&&d.removeEventListener("keypress",d.keyPressEventListener,true);d.addEventListener("keypress",c,true);d.keyPressEventListener=c;return d},t=function(a,b,c){a.isSelected=b;v(a,"isSelected",true,true);aa(a);if(typeof a.treeGrid!=null){a.treeGrid.selectedItem= +a;if(c!="Extended"&&c!="ExtendedFocus")a.treeGrid.selectedItems=[a];var d;if(c!="Extended"&&c!="ExtendedFocus")for(d=0;d=1&&(typeof c.allowUserToResizeColumns=== +"undefined"||c.allowUserToResizeColumns)&&(typeof b.allowUserToResize==="undefined"||b.allowUserToResize)){d.isGripperVisible=false;var h=b.treeGrid,g=function(a){d.isGripperVisible=a;d.style.cursor=a?"e-resize":"default";d.style.borderRight=a?"solid 1px "+c.border:"";e.style.width=b.width-(a?1:0)+"px"},j=c.splitterWidth;d.addEventListener("mouseover",function(a){if(!DlhSoft.Controls.TreeGrid.isGripperDragging&&!(d.isGripperDragging||typeof a.offsetX==="undefined"&&a.currentTarget!=d))g((typeof a.offsetX!== +"undefined"?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=b.width-j)},true);d.addEventListener("mousemove",function(a){if(!DlhSoft.Controls.TreeGrid.isGripperDragging&&!(d.isGripperDragging||typeof a.offsetX==="undefined"&&a.currentTarget!=d))g((typeof a.offsetX!=="undefined"?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=b.width-j)},true);e.addEventListener("mouseover",function(a){!DlhSoft.Controls.TreeGrid.isGripperDragging&&(!d.isGripperDragging&&!(typeof a.offsetX!=="undefined"||a.currentTarget!= +e))&&g(a.layerX-a.currentTarget.offsetLeft>=b.width-j)},false);e.addEventListener("mousemove",function(a){!DlhSoft.Controls.TreeGrid.isGripperDragging&&(!d.isGripperDragging&&!(typeof a.offsetX!=="undefined"||a.currentTarget!=e))&&g(a.layerX-a.currentTarget.offsetLeft>=b.width-j)},false);d.addEventListener("mousedown",function(a){if(!(a.button!=0||!d.isGripperVisible||DlhSoft.Controls.TreeGrid.isGripperDragging)){DlhSoft.Controls.TreeGrid.isGripperDragging=true;d.isGripperDragging=true;d.initialGripperDraggingX= +a.clientX;d.initialColumnWidth=b.width}},true);a.addEventListener("mousemove",function(a){if(d.isGripperDragging){b.width=Math.max(b.minWidth,d.initialColumnWidth+(a.clientX-d.initialGripperDraggingX));if(typeof b.maxWidth!=="undefined"&&b.width>b.maxWidth)b.width=b.maxWidth;e.style.width=b.width-1+"px";typeof c.columnWidthChangeHandler!=="undefined"&&setTimeout(function(){c.columnWidthChangeHandler(b,b.width)},0);if(!h.isWaitingToRefreshColumns){h.isWaitingToRefreshColumns=true;setTimeout(function(){var a= +U(c.columns);h.gridHeader.style.width=a+"px";h.gridContent.style.width=a+"px";delete h.isWaitingToRefreshColumns;h.refreshGridItems()},0)}}},true);a.addEventListener("mouseup",function(){if(d.isGripperDragging){delete d.isGripperDragging;delete d.initialGripperDraggingX;delete d.initialColumnWidth;g(false);delete DlhSoft.Controls.TreeGrid.isGripperDragging}},true);d.addEventListener("mouseout",function(){d.isGripperDragging||g(false)},false)}return d},N=function(a,b){for(var c=-1,d=null,e=null,f= +[],h=0;hj){g.indentation=j;v(g,"indentation",false,true)}d.hasChildren=g.indentation>d.indentation;if(d.hasChildren&&typeof d.isMilestone!=="undefined"&& +d.isMilestone){d.isMilestone=false;v(d,"isMilestone",false,true)}}g.isVisible=c<0||g.indentation<=c;if(g.isVisible&&!g.isExpanded)c=g.indentation;g.isExpanded&&g.indentation==c&&(c=-1);d=g}if(d!=null)d.hasChildren=false;b.selectedItem=e;b.selectedItems=f},O=function(a,b,c){c.isHierarchicalInformationInitialized=false;var b=[],d,e;for(e=0;e0&&(f=b[b.length-1]);f!=null&&d.indentation<=f.indentation;){b.pop();f=b[b.length-1]}d.parent=f;d.children= +[];f!=null&&f.children.push(d);(f==null||d.indentation>f.indentation)&&b.push(d)}c.isHierarchicalInformationInitialized=true},r=function(a,b,c,d,e){for(var f=0,h=0;h0;)if(g.indexOf(a.childNodes[m])>=0){o=m;break}for(m=a.childNodes.length;m-- > +0;)a.removeChild(a.childNodes[m]);for(m=0;m=0&&setTimeout(function(){try{for(var b=a.childNodes[o];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(c){}},0)};if(b.wasGridItemContentLoaded)setTimeout(g,0);else{g(); +b.wasGridItemContentLoaded=true}}},W=function(a){if(typeof a.isWaitingToRefreshGridItem==="undefined"){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!=="undefined"&&Q(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings);V(a,a.treeGrid.items,a.treeGrid.settings);delete a.isWaitingToRefreshGridItem},0)}},ta=function(a,b,c,d,e,f){var h=b.treeGrid.ownerDocument;(!f.isVirtualizing||typeof b.isVirtuallyVisible!== +"undefined"&&b.isVirtuallyVisible)&&setTimeout(function(){if(typeof b.gridItemSelectionContainer!=="undefined"){var g=b.gridItemSelectionContainer;typeof f.selectedItemClass!=="undefined"&&g.setAttribute("class",b.isSelected?f.selectedItemClass:null);typeof f.selectedItemStyle!=="undefined"&&g.setAttribute("style",b.isSelected?f.selectedItemStyle:null)}var g=[],j=null;try{j=h.activeElement}catch(m){}for(;j!=null&&j!=b.gridItem;){g.push(j);j=j.parentNode}for(var k=-1,j=a.childNodes.length;j-- >0;)if(a.childNodes[j].isSelection&& +g.indexOf(a.childNodes[j])>=0){k=j;break}for(j=a.childNodes.length;j-- >0;)a.childNodes[j].isSelection&&a.removeChild(a.childNodes[j]);for(j=0;j=0&&setTimeout(function(){try{for(var b=a.childNodes[k];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0]; +b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(c){}},0)},0)},aa=function(a){typeof a.gridItem!=="undefined"&&ta(a.gridItem,a,a.treeGrid.items,a.treeGrid.settings.columns,a.treeGrid.settings.toggleButtonAreaWidth,a.treeGrid.settings)},ca=function(a,b,c,d,e){var f=a.treeGrid.ownerDocument,h=f.createElement("div"),g=0;c.isTreeView==true&&(g=e.indentationLevelWidth*a.indentation);h.setAttribute("style","overflow: hidden; vertical-align: middle; display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing; margin: 0px; padding: 0px; width: "+ +c.width+"px; height: "+e.itemHeight+"px; padding-left: "+g+"px");var j=f.createElement("div");typeof c.cellClass!=="undefined"?j.setAttribute("class",c.cellClass):typeof e.cellClass!=="undefined"&&j.setAttribute("class",e.cellClass);typeof c.cellStyle!=="undefined"?j.setAttribute("style",c.cellStyle):typeof e.cellStyle!=="undefined"&&j.setAttribute("style",e.cellStyle);var m=f.createElement("div");m.setAttribute("style","white-space: nowrap; overflow: hidden; margin: 0px; padding: 0px; width: "+(c.width- +g-16)+"px");if(c.isTreeView==true){g=f.createElement("div");g.setAttribute("style","display: inline-block; width: "+d+"px");if(a.hasChildren){d=f.createElement("div");d.setAttribute("style","cursor: default; padding-left: 1px; font-size: 12px; display: inline-block");f=e.collapsedToggleButtonTemplate;if(a.isExpanded)f=e.expandedToggleButtonTemplate;f=f();d.appendChild(f);da(d,a,b,f,null,null,e);g.appendChild(d)}m.appendChild(g)}a=c.cellTemplate(a);m.appendChild(a);j.appendChild(m);h.appendChild(j); +h.isSelection=c.isSelection;return h},Z=function(a,b){return function(){var c=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");c.setAttribute("points","3.5,2.5 3.5,11.5 10.5,6.5");return s(c,b)}},$=function(a,b){return function(){var c=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");c.setAttribute("points","2.5,3.5 11.5,3.5 6.5,10.5");return s(c,b)}},da=function(a,b,c,d,e,f,h){if(typeof e==="undefined"||e==null)e=d.querySelector("#PART_Button");e!=null&& +ea(e,e,h);if(typeof f==="undefined"||f==null)f=d.querySelector("#PART_Border");f!=null&&ea(f,e,h);c={toggleButton:a,item:b,items:c,content:d,settings:h};if(e!=null){e.tag=c;(typeof h.isExport==="undefined"||!h.isExport)&&e.addEventListener("mouseup",X,true)}if(f!=null){f.tag=c;(typeof h.isExport==="undefined"||!h.isExport)&&f.addEventListener("mouseup",X,true)}a.tag=c;e==null&&(f==null&&(typeof h.isExport==="undefined"||!h.isExport))&&a.addEventListener("mouseup",X,true);d.addEventListener("keypress", +function(a){if(a.keyCode==32){a.preventDefault();a.stopPropagation();C(b,!b.isExpanded,true)}},true);b.toggleButton=a},ea=function(a,b,c){if(!(typeof c.isExport!=="undefined"&&c.isExport)){a.addEventListener("mouseover",function(){typeof c.toggleButtonHoveringClass!=="undefined"&&b.setAttribute("class",c.toggleButtonHoveringClass);typeof c.toggleButtonHoveringStyle!=="undefined"&&b.setAttribute("style",c.toggleButtonHoveringStyle)},true);a.addEventListener("mouseout",function(){b.setAttribute("class", +c.toggleButtonClass);b.setAttribute("style",c.toggleButtonStyle)},true)}},X=function(a){a.stopPropagation();a=a.target.tag.item;C(a,!a.isExpanded,true)},C=function(a,b,c,d){if(a.isExpanded!=b){a.isExpanded=b;(typeof d==="undefined"||d)&&v(a,"isExpanded",c,true);fa(a)}},fa=function(a,b){if(typeof a.toggleButton==="undefined")(typeof b==="undefined"||b)&&setTimeout(function(){fa(a,false)},0);else{var c=a.toggleButton,d=c.tag,e=d.settings,f=e.expandedToggleButtonTemplate,h=e.collapsedToggleButtonTemplate; +a.isExpanded&&(h=f);var f=h(),h=f.querySelector("#PART_Button"),g=f.querySelector("#PART_Border");c.replaceChild(f,d.content);d.content=f;d=d.items;da(c,a,d,f,h,g,e);a.isVisible&&!(typeof a.isHidden!=="undefined"&&a.isHidden)&&ua(d,a,e);P(d,e)}},ua=function(a,b,c){var d=-1,e=false,f=false,h=false,g=0,j,m,k;for(m=0;m=0&&R(b[c]);R(a);c=a.index+ +1;c=b.gridHeaderContainer.clientHeight+b.gridContentContainer.clientHeight-24){c=b.gridContentContainer.scrollTop;b.gridContentContainer.scrollTop=b.gridContentContainer.scrollTop+20;if(typeof b.isDuringVerticalScrolling=== +"undefined"){b.isDuringVerticalScrolling=true;setTimeout(function(){d=b.gridContentContainer.scrollTop-c;b.draggingInitialThumbPosition=b.draggingInitialThumbPosition+d;delete b.isDuringVerticalScrolling},0)}}}},ga=function(a){var b=a.itemTop-a.treeGrid.gridContentContainer.scrollTop;if(b<0)a.treeGrid.gridContentContainer.scrollTop=a.itemTop;else if(b>a.treeGrid.gridContentContainer.clientHeight-a.treeGrid.settings.itemHeight)a.treeGrid.gridContentContainer.scrollTop=a.itemTop-(a.treeGrid.gridContentContainer.clientHeight- +a.treeGrid.settings.itemHeight)},sa=function(a,b,c,d,e,f,h,g){b.addEventListener("scroll",function(){if(d.scrollLeft!=b.scrollLeft)d.scrollLeft=b.scrollLeft;I(h,b,g)},true);ha(b,c,e,g);typeof a.updateGridHeaderTimer!=="undefined"&&clearInterval(a.updateGridHeaderTimer);a.updateGridHeaderTimer=setInterval(function(){try{ha(b,c,e,g)}catch(d){try{clearInterval(a.updateGridHeaderTimer)}catch(f){}}},100);window.addEventListener("mousewheel",function(){try{a.cancelDrag=true}catch(b){}},true)},ha=function(a, +b,c,d){setTimeout(function(){try{var e=b.clientWidth-a.clientWidth;e<0&&(e=0);var f=e+"px";if(c.style.width!=f){c.style.width=f;if(e>0){c.style.boxSizing="border-box";c.style.MozBoxSizing="border-box";c.style.border="solid 1px "+d.border;c.style.borderTop="none";c.style.borderRight="none"}else{c.style.border="";c.style.borderTop="";c.style.borderRight="";c.style.boxSizing="";c.style.MozBoxSizing=""}}}catch(h){}},0)},I=function(a,b,c){if(c.isVirtualizing)for(var d=b.scrollTop-c.itemHeight,b=d+b.clientHeight+ +2*c.itemHeight,e=0;e=d&&f.itemTop=b))&&delete f.isVirtuallyVisible}},ra=function(a,b){for(var c=a.childNodes.length;c-- >0;)a.removeChild(a.childNodes[c]);a.appendChild(b)},Y=function(a,b,c,d){var e=d.indexOf(a);if(!(e<0||b<0||b==e||b>=d.length)){d.splice(e,1);d.splice(b,0,a);ia(d);u(c);typeof c.settings.itemMoveHandler!=="undefined"&&c.settings.itemMoveHandler(a,e,b)}},T=function(a,b,c,d,e){if(!(a<0||c<0||c==a||c>e.length-b)){var f=[],h;for(h=a;h< +a+b;h++)f.push(e[h]);e.splice(a,b);for(h=0;hb){d.indentation=b;v(d,"indentation",false,true)}b=d.indentation+1}},xa=function(a,b,c,d,e,f,h,g,j,m){a.addEventListener("mousedown",function(c){if(c.button==0){delete d.cancelDrag;d.draggingItem=b;d.dragType="Ordering"; +d.style.cursor=a.style.cursor;d.draggingInitialY=c.clientY;d.draggingInitialThumbPosition=0;c.preventDefault()}},true);if(typeof d.draggableOrderingItems==="undefined")d.draggableOrderingItems=[];for(var k=false,o=0;oe+1)){n={content:f.content,indentation:f.indentation,"class":f["class"],style:f.style,isSummaryEnabled:f.isSummaryEnabled,isHidden:f.isHidden,isExported:true,tag:f};ya(n,f);a.push(n);f.exportItem=n}}var s=D.createElement("p");s.innerHTML=typeof b!=="undefined"? +b:"";D.body.appendChild(s);var r=D.createElement("div");r.setAttribute("style","width: "+q+"px");try{DlhSoft.Controls.TreeGrid.initialize(r,a,k,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(u){}setTimeout(function(){t&&D.body.setAttribute("style","margin: 0px");var a=D.createElement("div");a.appendChild(r);D.body.replaceChild(a,s);if(g){a.setAttribute("style","width: "+r.offsetHeight+"px; height: "+ +q+"px; overflow: hidden");a=Math.round((r.offsetWidth-r.offsetHeight)/2);r.setAttribute("style","width: "+q+"px; transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px); -webkit-transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px)")}D.close();if(typeof p!==void 0){p.focus();if(typeof h!=="undefined"&&h){p.print();(typeof j==="undefined"||j)&&p.close()}}},0)},ka=function(a,b,c){typeof c==="undefined"&&(c=false);var d=a.parent,e=a.index;if(d==null){for(d=0;e-- >0;){a=b[e];a.indentation== +0&&d++}return d+(!c?1:0)}return ka(d,b)+"."+(d.children.indexOf(a)+(!c?1:0))},pa=function(a,b,c){var d;for(d=0;d0?b[e-1]:null;h=h!=null?h.indentation+1:0;if(d.indentation>h)d.indentation=h}else if(typeof d.indentation==="undefined"||d.indentationh.indentation)d.indentation=h.indentation;E([d],c);b.splice(e,0,d);N(b,a);O(b,c,a);var g,j=null;if(e0){for(g=b[f-1];g.parent!=null;)g=g.parent;j=g.isExpanded;d.hasChildren&&C(g,d.isExpanded,false,true);g.indentation>=d.indentation&&(g=null)}else b[0].isExpanded||C(b[0],true,false,true);var m=f+1d.indentation)&&C(m,true,false,true);var k=m!=null?m.indentation:null;b.splice(f,1);N(b,a);O(b,c,a);typeof d.gridItemContainer!=="undefined"&&a.gridContent.removeChild(d.gridItemContainer); +m=f=b.length&&(f=b.length-1);f>=0&&M(b[f],b,a,c);I(b,a.gridContentContainer,c)};a.removeItems=function(b){for(var c=0;c0?a.items[d.index-1]:null;if(!(f==null||d.indentation>f.indentation)){C(d,true,false,true);d.indentation++;v(d,"indentation",true,true);S(b,c)&&L(b);for(M(d,b,a,c);d!=null;){d.isExpanded||C(d,true,false);d=d.parent}}};a.decreaseItemIndentation=function(d){var f=d.index=b.length-1||Y(c,d+1,a,b)};a.moveItemHierarchy= +function(c,d){for(var h=b.indexOf(c),g=h+1;g0;){if(b[g].indentation100&&(a=100);d(a)},e,f,h)},timeSpanInputColumnTemplateBase:function(a,b,c,d,e,f,h,g){typeof e==="undefined"&& +(e=1);return DlhSoft.Controls.TreeGrid.numberInputColumnTemplateBase(a,b,function(){var a=c()/(hourDuration*e);return Math.round(a*100)/100},function(a){a=parseFloat(a);a<0&&(a=0);d(a*hourDuration*e)},f,h,g)},datePickerInputColumnTemplateBase:function(a,b,c,d,e,f,h,g,j,m,k,o,n){k||(k=["Su","Mo","Tu","We","Th","Fr","Sa"]);o||(o=function(a){return a.toString()});n||(n=function(a){return new Date(a)});var l=a.createElement("input");l.setAttribute("type","text");c=c();typeof c==="undefined"?c="":c!=null&& +(c=o(c));l.setAttribute("value",c);DlhSoft.Controls.DatePicker&&l.addEventListener("focus",function(){var b=DlhSoft.Controls.DatePicker.get(l);if(!b||!b.isOpen){var c=0,d=0;try{c=l.selectionStart;d=l.selectionEnd}catch(e){}b=DlhSoft.Controls.DatePicker.initialize(l,void 0,{inputStyle:null,defaultTimeOfDay:g,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:j,months:m,daysOfWeek:getAbbreviations(k),dateTimeFormatter:o, +dateTimeParser:n},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{l.selectionStart=c;l.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{l.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);l.dispatchEvent(b)})}},true);c= +"";typeof f!=="undefined"&&!f()&&(c="; display: none");f="";typeof h!=="undefined"&&h()&&(f="; font-weight: bold");l.setAttribute("style","background-color: Transparent; width: "+b+"px; border-width: 0px; padding: 0px"+c+f);typeof e!=="undefined"&&!e()&&l.setAttribute("disabled","true");var p=function(){var a=l.value,a=a!=""?n(a):null;d(a)};l.addEventListener("change",function(){p()},true);l.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();p()}},true); +l.addEventListener("focus",function(){l.style.backgroundColor="White"},true);l.addEventListener("blur",function(){l.style.backgroundColor="Transparent"},true);return l},dateTimePickerInputColumnTemplateBase:function(a,b,c,d,e,f,h,g,j,m,k,o,n){k||(k=["Su","Mo","Tu","We","Th","Fr","Sa"]);o||(o=function(a){return a.toString()});n||(n=function(a){return new Date(a)});var l=a.createElement("input");l.setAttribute("type","text");c=c();typeof c==="undefined"?c="":c!=null&&(c=o(c));l.setAttribute("value", +c);(DlhSoft.Controls.DateTimePicker||DlhSoft.Controls.DatePicker)&&l.addEventListener("focus",function(){var b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(l);if(!b||!b.isOpen){var c=0,d=0;try{c=l.selectionStart;d=l.selectionEnd}catch(e){}b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(l,void 0,{inputStyle:null,defaultTimeOfDay:g,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0", +calendarSelectorLevels:j,months:m,daysOfWeek:getAbbreviations(k),dateTimeFormatter:o,dateTimeParser:n},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{l.selectionStart=c;l.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{l.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents"); +b.initEvent("blur",true,false);l.dispatchEvent(b)})}},true);c="";typeof f!=="undefined"&&!f()&&(c="; display: none");f="";typeof h!=="undefined"&&h()&&(f="; font-weight: bold");l.setAttribute("style","background-color: Transparent; width: "+b+"px; border-width: 0px; padding: 0px"+c+f);typeof e!=="undefined"&&!e()&&l.setAttribute("disabled","true");var p=function(){var a=l.value,a=a!=""?n(a):null;d(a)};l.addEventListener("change",function(){p()},true);l.addEventListener("keypress",function(a){if(a.keyCode== +13){a.preventDefault();a.stopPropagation();p()}},true);l.addEventListener("focus",function(){l.style.backgroundColor="White"},true);l.addEventListener("blur",function(){l.style.backgroundColor="Transparent"},true);return l},multiSelectorComboBoxInputColumnTemplateBase:function(a,b,c,d,e,f,h,g){var j=a.createElement("input");j.setAttribute("type","text");d=d();typeof d==="undefined"&&(d="");j.setAttribute("value",d);DlhSoft.Controls.MultiSelectorComboBox&&j.addEventListener("focus",function(){var b= +DlhSoft.Controls.MultiSelectorComboBox.get(j);if(!b||!b.isOpen&&b.availableChoices.length>0){var b=c(),d=0,e=0;try{d=j.selectionStart;e=j.selectionEnd}catch(f){}b=DlhSoft.Controls.MultiSelectorComboBox.initialize(j,b,void 0,{inputStyle:null,autoAppendAvailableChoices:false,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0; color: Black; font-size: small; max-height: 188px; overflow-y: auto"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); +b.openDropDown();setTimeout(function(){try{j.selectionStart=d;j.selectionEnd=e}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{j.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);j.dispatchEvent(b)})}},true);d="";typeof h!=="undefined"&&!h()&&(d="; display: none");h="";typeof g!=="undefined"&&g()&&(h="; font-weight: bold");j.setAttribute("style","background-color: Transparent; width: "+ +b+"px; border-width: 0px; padding: 0px"+d+h);typeof f!=="undefined"&&!f()&&j.setAttribute("disabled","true");j.addEventListener("change",function(){e(j.value)},true);j.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();e(j.value)}},true);j.addEventListener("focus",function(){j.style.backgroundColor="White"},true);j.addEventListener("blur",function(){j.style.backgroundColor="Transparent"},true);return j},dateTimeInputColumnTemplateBase:function(a,b,c,d, +e,f,h){return DlhSoft.Controls.TreeGrid.textInputColumnTemplateBase(a,b,function(){var a=c();return a!=null?a.toString():""},function(a){a=a!=""?new Date(a):null;d(a)},e,f,h)},getIndexColumnTemplate:function(){return function(a){var b=a.treeGrid;return DlhSoft.Controls.TreeGrid.textColumnTemplateBase(b.ownerDocument,function(){return b.getItemIndexString(a)})}},getWbsColumnTemplate:function(a){return function(b){var c=b.treeGrid;return DlhSoft.Controls.TreeGrid.textColumnTemplateBase(c.ownerDocument, +function(){return c.getItemWbsIndexString(b,a)})}},getIconColumnTemplate:function(a,b,c,d,e,f,h,g,j){if(typeof a==="string")var m=a,a=function(){return m};typeof d==="undefined"||d==false?d=function(){return false}:d==true&&(d=function(){return true});return function(k){var m=k.treeGrid,n=m.ownerDocument.createElement("img");n.setAttribute("src",a(k));typeof b!=="undefined"&&n.setAttribute("class",b);typeof c!=="undefined"&&n.setAttribute("style",c);if(!m.settings.isReadOnly&&d(k)){n.style.cursor= +"move";xa(n,k,m.items,m,m.settings,e,f,h,g,j)}return n}}}}()); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Components.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Components.ts new file mode 100644 index 000000000..3b388a74d --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Components.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ElementRef, Input } from '@angular/core'; +import GanttChartItem = DlhSoft.Controls.GanttChartView.Item; +import GanttChartSettings = DlhSoft.Controls.GanttChartView.Settings; +import ScheduleChartItem = DlhSoft.Controls.ScheduleChartView.Item; +import ScheduleChartSettings = DlhSoft.Controls.ScheduleChartView.Settings; +import LoadChartItem = DlhSoft.Controls.LoadChartView.Item; +import LoadChartSettings = DlhSoft.Controls.LoadChartView.Settings; + +@Component({ + selector: 'ganttchartview', + template: '
' +}) +export class GanttChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: GanttChartItem[] = []; + @Input() settings: GanttChartSettings = {}; + @Input() license: string; + @Input() change: (item: GanttChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.GanttChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} + +@Component({ + selector: 'schedulechartview', + template: '
' +}) +export class ScheduleChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: ScheduleChartItem[] = []; + @Input() settings: ScheduleChartSettings = {}; + @Input() license: string; + @Input() change: (item: GanttChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.ScheduleChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} + +@Component({ + selector: 'loadchartview', + template: '
' +}) +export class LoadChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: LoadChartItem[] = []; + @Input() settings: LoadChartSettings = {}; + @Input() license: string; + @Input() change: (item: GanttChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.LoadChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Directives.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Directives.js new file mode 100644 index 000000000..e628d44a8 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Angular.Directives.js @@ -0,0 +1,60 @@ +// Version 1.0.0.0. +var module = angular.module("DlhSoft.ProjectData.GanttChart.Directives", []); +dsDefinePDGCDirective(module, "GanttChart"); +dsDefinePDGCDirective(module, "ScheduleChart"); +dsDefinePDGCDirective(module, "LoadChart"); +function dsDefinePDGCDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls[controlName ? controlName : directiveName + "View"].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function() { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.d.ts new file mode 100644 index 000000000..4614e1c4f --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.d.ts @@ -0,0 +1,86 @@ +/// +declare module DlhSoft.Controls.GanttChartView.ProjectSerializer { + function initialize(control: GanttChartView.Element, settings?: Settings): Service; + class Service { + public control: GanttChartView.Element; + public settings: Settings; + constructor(control: GanttChartView.Element, settings?: Settings); + private static secondDuration; + private static minuteDuration; + private static hourDuration; + private static dayDuration; + private static weekDuration; + public loadXml(xml: string): void; + public importXml(input: any): void; + private static parseXmlToTimeSpan(value); + private static parseXmlToDateTime(value); + private static indexOfKey(dictionary, key); + static projectXmlTemplate: string; + static scheduleWeekDayXmlTemplate: string; + static scheduleDayWorkingTimesXmlTemplate: string; + static taskXmlTemplate: string; + static predecessorXmlTemplate: string; + static resourceXmlTemplate: string; + static assignmentXmlTemplate: string; + public getXml(): string; + private getXmlInternal(compact?); + private saveProjectInfo(template, values); + private saveGanttChartItem(item, template, values); + private savePredecessorItem(item, predecessorItem, template, values); + private saveResourceInfo(resource, template, values); + private saveAssignmentInfo(item, resource, allocationUnits, template, values); + private static applyStringTemplateValues(template, values); + private static convertDateToXml(dateTime); + private static convertDayTimeToXml(dayTime); + private static convertTimeSpanToXml(timeSpan); + public exportXml(output?: any): any; + static initializeSettings(settings: Settings): void; + } + interface Settings { + assignableResources?: string[]; + projectInfoLoadingHandler? (e: ElementLoadingEventArgs): void; + ganttChartItemLoadingHandler? (e: GanttChartItemLoadingEventArgs): void; + assignmentInfoLoadingHandler? (e: AssignmentInfoLoadingEventArgs): void; + predecessorItemLoadingHandler? (e: PredecessorItemLoadingEventArgs): void; + assignableResourceInfoLoadingHandler? (e: AssignableResourceInfoLoadingEventArgs): void; + projectInfoSavingHandler? (e: ElementSavingEventArgs): void; + ganttChartItemSavingHandler? (e: GanttChartItemSavingEventArgs): void; + predecessorItemSavingHandler? (e: PredecessorItemSavingEventArgs): void; + resourceInfoSavingHandler? (e: ResourceInfoSavingEventArgs): void; + assignmentInfoSavingHandler? (e: AssignmentInfoSavingEventArgs): void; + compact?: boolean; + spaceSeparated?: boolean; + } + interface ElementLoadingEventArgs { + sourceElement: GanttChartView.Element; + } + interface GanttChartItemLoadingEventArgs extends ElementLoadingEventArgs { + ganttChartItem: GanttChartView.Item; + } + interface AssignmentInfoLoadingEventArgs extends GanttChartItemLoadingEventArgs { + resource: string; + allocationUnits: number; + } + interface PredecessorItemLoadingEventArgs extends GanttChartItemLoadingEventArgs { + predecessorItem: GanttChartView.PredecessorItem; + } + interface AssignableResourceInfoLoadingEventArgs extends ElementLoadingEventArgs { + resource: string; + } + interface ElementSavingEventArgs { + outputXml: string; + } + interface GanttChartItemSavingEventArgs extends ElementSavingEventArgs { + ganttChartItem: GanttChartView.Item; + } + interface PredecessorItemSavingEventArgs extends GanttChartItemSavingEventArgs { + predecessorItem: GanttChartView.PredecessorItem; + } + interface ResourceInfoSavingEventArgs extends ElementSavingEventArgs { + resource: string; + } + interface AssignmentInfoSavingEventArgs extends GanttChartItemSavingEventArgs { + resource: string; + allocationUnits: number; + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.js new file mode 100644 index 000000000..217f29dcd --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras.js @@ -0,0 +1,34 @@ +"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls.Extras",company:"DlhSoft",product:"Project Data Modern Library",version:"5.1.10.5",copyright:"Copyright \ufffd 2013-2019 DlhSoft",title:"Project Data Gantt Chart HTML Controls Extras",description:"Project Data Gantt Chart related HTML client extra components"}); +DlhSoft.buildReleaseDate=function(i,C,p){i=new Date(i,C-1,p);return i>DlhSoft.buildReleaseDate?i:DlhSoft.buildReleaseDate}(2014,1,15);var DlhSoft; +(function(i){(function(i){(function(p){(function(i){i.initialize=function(a,b){return new J(a,b)};var J=function(){function a(b,c){this.control=b;this.settings=c;"undefined"===typeof c&&(c={});this.settings=c;a.initializeSettings(this.settings)}a.prototype.loadXml=function(b){this.importXml(b)};a.prototype.importXml=function(b){var c=this.control,e=c.items,g=c.settings,d=null;if("undefined"!==typeof b&&("undefined"!==typeof b.document&&(b=b.document),"undefined"!==typeof b.getElementsByTagName))d= +b,1!=d.getElementsByTagName("Project").length&&(b=d.body.innerHTML,b=b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/
/g,"\n"),d=null);null==d&&(d=(new DOMParser).parseFromString(b.toString(),"text/xml"));var b=[],W=[],i=[],q=[];"undefined"!==typeof this.settings.assignableResources&&this.settings.assignableResources.splice(0,this.settings.assignableResources.length);d=d.getElementsByTagName("Project")[0];if("undefined"!==typeof d){var k,l,s,h;try{var n=d.getElementsByTagName("CalendarUID")[0].childNodes[0].nodeValue, +r,f,y=d.getElementsByTagName("Calendars")[0].getElementsByTagName("Calendar");for(f=0;fd?1:-1});var z=n[0];k=parseInt(z.getElementsByTagName("DayType")[0].childNodes[0].nodeValue)-1;l=parseInt(n[n.length-1].getElementsByTagName("DayType")[0].childNodes[0].nodeValue)-1;var m=z.getElementsByTagName("WorkingTimes")[0].getElementsByTagName("WorkingTime");s=a.parseXmlToTimeSpan(m[0].getElementsByTagName("FromTime")[0].childNodes[0].nodeValue);for(f=h=0;f=t.getElementsByTagName("Name").length)){var M=parseInt(t.getElementsByTagName("OutlineLevel")[0].childNodes[0].nodeValue)-1;if(!(0>M)){E=t.getElementsByTagName("UID")[0].childNodes[0].nodeValue;K=t.getElementsByTagName("Name")[0].childNodes[0].nodeValue;var N=a.parseXmlToDateTime(t.getElementsByTagName("Start")[0].childNodes[0].nodeValue),O=a.parseXmlToDateTime(t.getElementsByTagName("Finish")[0].childNodes[0].nodeValue),C=parseInt(t.getElementsByTagName("PercentComplete")[0].childNodes[0].nodeValue), +X=p.getOutputDate(c.getCompletedFinish(p.getInputDate(N),C/100,p.getInputDate(O))),Y="1"==t.getElementsByTagName("Milestone")[0].childNodes[0].nodeValue?!0:!1;o={content:K,indentation:M,isExpanded:!0,start:N,finish:O,completedFinish:X,isMilestone:Y};"undefined"!==typeof this.settings.ganttChartItemLoadingHandler&&(j={sourceElement:t,ganttChartItem:o},this.settings.ganttChartItemLoadingHandler(j),o=j.ganttChartItem);b.push(o);i.push({key:E,value:o})}}}var P=d.getElementsByTagName("Resources")[0].getElementsByTagName("Resource"); +for(f=0;f=G.getElementsByTagName("Name").length)){E=G.getElementsByTagName("UID")[0].childNodes[0].nodeValue;var w=K=G.getElementsByTagName("Name")[0].childNodes[0].nodeValue;"undefined"!==typeof this.settings.assignableResourceInfoLoadingHandler&&(j={sourceElement:G,resource:w},this.settings.assignableResourceInfoLoadingHandler(j),w=j.resource);W.push(w);q.push({key:E,value:w});"undefined"!==typeof this.settings.assignableResources&&this.settings.assignableResources.push(w)}}var Q= +d.getElementsByTagName("Assignments")[0].getElementsByTagName("Assignment");for(f=0;fB)){o=i[B].value;var Z=H.getElementsByTagName("ResourceUID")[0].childNodes[0].nodeValue,R=a.indexOfKey(q,Z);if(!(0>R)){var w=q[R].value,S=H.getElementsByTagName("Units")[0].childNodes[0].nodeValue,A="undefined"!==typeof S?parseFloat(S):1,L=w+(1!=A?" ":"")+(1!=A?"["+Math.round(1E4*A)/100+"%]":"");"undefined"!== +typeof this.settings.assignmentInfoLoadingHandler&&(j={sourceElement:H,ganttChartItem:o,resource:w,allocationUnits:A},this.settings.assignmentInfoLoadingHandler(j),w=j.resource,A=j.allocationUnits,L=w+(1!=A?" ":"")+(1!=A?"["+Math.round(1E4*A)/100+"%]":""));o.assignmentsContent="undefined"===typeof o.assignmentsContent||0==o.assignmentsContent.length?L:o.assignmentsContent+", "+L}}}D=d.getElementsByTagName("Tasks")[0].getElementsByTagName("Task");for(f=0;fB)){o=i[B].value;var T=t.getElementsByTagName("PredecessorLink");for(k=0;kU)){var aa=i[U].value,I=x.getElementsByTagName("Type")&&x.getElementsByTagName("Type")[0]&&x.getElementsByTagName("Type")[0].childNodes?parseInt(x.getElementsByTagName("Type")[0].childNodes[0].nodeValue):1;l=1==I?"":3==I?"SS":0==I?"FF":2==I?"SF":"";var V=x.getElementsByTagName("LinkLag")&& +x.getElementsByTagName("LinkLag")[0]&&x.getElementsByTagName("LinkLag")[0].childNodes?x.getElementsByTagName("LinkLag")[0].childNodes[0].nodeValue:null,ba=(null!=V?parseInt(V):0)/10*a.minuteDuration;l={item:aa,dependencyType:l,lag:ba};"undefined"!==typeof this.settings.predecessorItemLoadingHandler&&(j={sourceElement:x,ganttChartItem:o,predecessorItem:l},this.settings.predecessorItemLoadingHandler(j),l=j.predecessorItem,o=j.ganttChartItem);"undefined"===typeof o.predecessors&&(o.predecessors=[]); +o.predecessors.push(l)}}}for(f=0;ff&&(e=f);g.timelineStart=new Date(e.valueOf()-1*a.weekDuration);g.timelineFinish=new Date(e.valueOf()+52*a.weekDuration);g.displayedTime=e;c.refresh()};a.parseXmlToTimeSpan=function(b){var a,e,g,d,i;d=b.indexOf(":");i=b.lastIndexOf(":");0d&&b.length>i)&&(a=parseInt(b.substr(0,d)),e=parseInt(b.substr(d+1,i)),g=parseInt(b.substr(i+1,b.length)));return 1E3*(3600*a+60*e+g)};a.parseXmlToDateTime= +function(b){var a,e,g,d,i,p,q,k,l=b.indexOf("T");q=b.indexOf("-");0q&&(e=parseInt(b.substring(q+1,k)),l>k&&(g=parseInt(b.substring(k+1,l)))));q=b.indexOf(":");0k&&(p=parseInt(b.substring(k+1,b.length)))));return new Date(a,e-1,g,d,i,p)};a.indexOfKey=function(b,a){for(var e=0;ethis.settings.assignableResources.indexOf(k[d])&&this.settings.assignableResources.push(k[d]); +var k=this.settings.assignableResources,l="";for(d=0;7>d;d++){var s=g.workingWeekStart<=d&&g.workingWeekFinish>=d;0/g,">")},{key:"Indentation",value:(h.indentation+1).toString()},{key:"Start",value:a.convertDateToXml(p.getOutputDate(f))},{key:"Finish",value:a.convertDateToXml(p.getOutputDate(y))},{key:"Duration",value:a.convertTimeSpanToXml(u)},{key:"CompletedDuration",value:a.convertTimeSpanToXml(n)},{key:"Effort",value:a.convertTimeSpanToXml(r)},{key:"CompletedEffort",value:a.convertTimeSpanToXml(z)}, +{key:"RemainingEffort",value:a.convertTimeSpanToXml(r-z)},{key:"IsMilestone",value:h.isMilestone?1:0},{key:"IsSummary",value:h.hasChildren?1:0},{key:"Cost",value:c.getItemCost(h)},{key:"Completion",value:!h.isMilestone&&0q&&!h.hasChildren?""+a.convertDateToXml(p.getOutputDate(f))+"":""},{key:"PredecessorLinks",value:m}];s+=this.saveGanttChartItem(h,a.taskXmlTemplate,r)}n="";for(d=0;d< +k.length;d++)0/g,">")}],n+=this.saveResourceInfo(h,a.resourceXmlTemplate,r);f="";for(d=0;d/g,">").replace(/\n/g,"
");a.write(e);a.close();return c};a.initializeSettings=function(){};a.secondDuration=1E3;a.minuteDuration=60*a.secondDuration;a.hourDuration=60*a.minuteDuration;a.dayDuration=24*a.hourDuration;a.weekDuration=7*a.dayDuration;a.projectXmlTemplate="\n\n14\n1\n{ProjectStart}\n{DayStart}\n{DayFinish}\n{MinutesPerDay}\n{MinutesPerWeek}\n7\n2\n1\n\n\n1\nStandard\n1\n-1\n\n{ScheduleWeekDays}\n\n\n\n\n{Tasks}\n\n\n{Resources}\n\n\n{Assignments}\n\n"; +a.scheduleWeekDayXmlTemplate="\n{DayNumber}\n{IsWorkingDay}\n{WorkingTimes}\n";a.scheduleDayWorkingTimesXmlTemplate="\n\n{FromTime}\n{ToTime}\n\n";a.taskXmlTemplate="\n{Index}\n{Index}\n1\n{Content}\n0\n0\n{Indentation}\n500\n{Start}\n{Finish}\n{Duration}\n7\n{Effort}\n{CompletedDuration}\n{CompletedEffort}\n{RemainingEffort}\n{IsMilestone}\n{IsSummary}\n0\n3\n{Completion}\n{Cost}\n0\n{ConstraintDefinition}\n-1\n0\n{PredecessorLinks}\n"; +a.predecessorXmlTemplate="\n{PredecessorIndex}\n{DependencyType}\n{Lag}\n5\n";a.resourceXmlTemplate="\n{Index}\n{Index}\n{Name}\n1\n0\n1\n";a.assignmentXmlTemplate="\n{Indexes}\n{TaskIndex}\n{ResourceIndex}\n{AllocationUnits}\n{Completion}\n{Start}\n{Finish}\n{Effort}\n{CompletedEffort}\n{RemainingEffort}\n"; +return a}();i.Service=J})(p.ProjectSerializer||(p.ProjectSerializer={}))})(i.GanttChartView||(i.GanttChartView={}))})(i.Controls||(i.Controls={}))})(DlhSoft||(DlhSoft={})); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts new file mode 100644 index 000000000..e93848041 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts @@ -0,0 +1,861 @@ +/* Assembly: DlhSoft.ProjectData.GanttChart.HTML.Controls, + Company: DlhSoft, + Product: Project Data Modern Library, + Version: 5.3.17.0, + Copyright: Copyright © 2012-2020 DlhSoft, + Title: Project Data Gantt Chart HTML Controls, + Description: Project Data Gantt Chart related HTML client components */ + +/* +/// +*/ + +/// + +declare module DlhSoft.Controls { + /** Represents a control that presents task data items using a Gantt Chart and an associated tree-grid. */ + module GanttChartView { + /** + * Initializes a GanttChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Task data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): Column[]; + + function getDefaultCollapsedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + function getDefaultExpandedToggleButtonTemplate(controlElement: Element, settings: Settings): () => SVGElement; + + /** Returns an array of default definitions that you can further customize and use as value for the scales property of the control settings used at initialization time. */ + function getDefaultScales(settings: Settings): Scale[]; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultStandardTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultSummaryTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultMilestoneTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultAssignmentsTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultDependencyLineTemplate(items: Item[], settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + function getDefaultPredecessorItemTemplate(settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + + /** Inside task template functions, sets up task drag and drop behavior for the non-null SVG elements specified to be designed as thumbs, considering the specified item and item positioning in the chart. */ + function initializeTaskDraggingThumbs(startThumb: SVGElement, startOnlyThumb: SVGElement, finishThumb: SVGElement, completedFinishThumb: SVGElement, item: Item, itemLeft: number, itemRight: number, itemCompletedRight: number): void; + + /** Inside task template functions, sets up dependency creation drag and drop behavior for the non-null SVG elements specified to be designed as thumbs inside its specified container group that would be used to supplementary present temporary dependency lines during drag and drop operations, considering the specified item and item positioning in the chart. */ + function initializeDependencyDraggingThumbs(thumb: SVGElement, startThumb: SVGElement, containerGroup: SVGGElement, item: Item, itemTop: number, itemRight: number, itemLeft: number): void; + + function getWorkingTime(dateTime: Date, settings: Settings, schedule?: Schedule): Date; + function getEffort(start: Date, finish: Date, settings: Settings, schedule?: Schedule): number; + function getFinish(start: Date, effort: number, settings: Settings, schedule?: Schedule): Date; + function getStart(effort: Date, finish: number, settings: Settings, schedule?: Schedule): Date; + function getCompletion(start: Date, completedFinish: Date, finish: Date, settings: Settings, schedule?: Schedule): number; + function getCompletedFinish(start: Date, completion: number, finish: Date, settings: Settings, schedule?: Schedule): number; + function getWeekStart(dateTime: Date, weekStartDay: number): Date; + function getWeekFinish(dateTime: Date, weekStartDay: number): Date; + + function defaultDateTimeFormatter(date: Date): string; + function defaultDateFormatter(date: Date): string; + function defaultDateTimeParser(value: string): Date; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function optionSelectColumnTemplateBase(document: HTMLDocument, width: number, optionCollectionGetter: () => any[], valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function numberInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function percentInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function timeSpanInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, scale?: number, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + function dateTimeInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function datePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function dateTimePickerInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], dateTimeFormatter?: (Date) => string, dateTimeParser?: (string) => Date): HTMLElement; + function multiSelectorComboBoxInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabled?: boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSource: string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIconColumnTemplate(imageSourceGetter: (item: Item) => string, imageClass: string, imageStyle: string, isMovingEnabledGetter: (item: Item) => boolean, isMovingToEnabledGetter?: (index: number, hoveringItem: Item) => boolean, movingTargetHoveringClass?: string, movingTargetHoveringStyle?: string, disabledMovingTargetHoveringClass?: string, disabledMovingTargetHoveringStyle?: string): (item: Item) => HTMLElement; + function getIndexColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + function getWbsColumnTemplate(zeroBased?: boolean): (item: Item) => HTMLElement; + function getEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getTotalEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getDurationColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getCompletedEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getTotalCompletedEffortColumnTemplate(inputWidth: number, scale?: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getCompletionColumnTemplate(inputWidth: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getPredecessorsColumnTemplate(inputWidth: number, isInputDisabled?: boolean, zeroBased?: boolean): (item: Item) => HTMLElement; + function getAssignmentSelectorColumnTemplate(selectWidth: number, assignableResourcesCollection: any[], isInputDisabled?: boolean, useMultiSelectorComboBox?: boolean): (item: Item) => HTMLElement; + function getAssignmentSelectorColumnTemplate(selectWidth: number, assignableResourcesCollectionGetter: (item: Item) => any[], isInputDisabled?: boolean, useMultiSelectorComboBox?: boolean): (item: Item) => HTMLElement; + function getCostColumnTemplate(inputWidth: number, isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getBaselineStartColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getBaselineFinishColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMinStartColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMaxStartColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMinFinishColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + function getMaxFinishColumnTemplate(inputWidth: number, useDatePicker?: boolean, useTimePicker?: boolean, defaultTimeOfDay?: number, calendarSelectorLevels?: number, months?: string[], daysOfWeek?: string[], isInputDisabled?: boolean): (item: Item) => HTMLElement; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides GanttChartView component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshGridItems(): void; refreshChartItems(): void; refreshItems(): void; refreshGridItem(item: Item): void; refreshChartItem(item: Item): void; refreshItem(item: Item): void; refreshPredecessorItems(item: Item): void; refreshItemGraph(item: Item): void; refreshItemPath(item: Item): void; refreshItemNeighbourhood(item: Item): void; + refreshCurrentTime(): void; setCurrentTime(currentTime: Date): void; updateCurrentTime(): void; + + insertItem(index: number, item: Item): void; addItem(item: Item): void; insertItems(index: number, items: Item[]): void; addItems(items: Item[]): void; + removeItem(item: Item): void; removeItems(items: Item[]): void; + moveRange(fromIndex: number, count: number, toIndex: number): void; + moveItem(item: Item, toIndex: number): void; + moveItemHierarchy(item: Item, toIndex: number): void; + moveItemUp(item: Item): void; moveItemDown(item: Item): void; + moveItemHierarchyUp(item: Item): void; moveItemHierarchyDown(item: Item): void; + + increaseItemIndentation(item: Item): void; decreaseItemIndentation(item: Item): void; + + setItemContent(item: Item, value: any): void; + setItemStart(item: Item, value: Date): void; setItemFinish(item: Item, value: Date): void; + setItemIsMilestone(item: Item, value: boolean): void; + getItemEffort(item: Item): number; setItemEffort(item: Item, value: number): void; getItemCompletedEffort(item: Item): number; setItemCompletedEffort(item: Item, value: number): void; + getItemTotalEffort(item: Item): number; getItemTotalCompletedEffort(item: Item): number; + setItemTotalEffort(item: Item, value: number): void; setItemTotalCompletedEffort(item: Item, value: number): void; + setItemHasFixedEffort(item: Item, value: boolean): void; + getItemDuration(item: Item): number; setItemDuration(item: Item, value: number): void; + getItemCompletion(item: Item): number; setItemCompletion(item: Item, value: number): void; + isItemCompleted(item: Item): boolean; setItemAsCompleted(item: Item): void; + hasItemStarted(item: Item): boolean; setItemAsNotStarted(item: Item): void; isItemOnSchedule(item: Item): boolean; + setItemAssignmentsContent(item: Item, value: any): void; + getItemIndexString(item: Item, zeroBased?: boolean): string; + getItemPredecessorsString(item: Item, zeroBased?: boolean): string; setItemPredecessorsString(item: Item, value: string, zeroBased?: boolean): void; + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + expandItem(item: Item): void; collapseItem(item: Item): void; + scrollToItem(item: Item): void; scrollToBottom(): void; scrollToDateTime(dateTime: Date): void; + increaseTimelinePage(timeAmount: number): void; decreaseTimelinePage(timeAmount: number): void; + setHourWidth(hourWidth: number): void; + setSplitterPosition(gridWidth: number, chartWidth: number); + + /** Returns the X coordinate of a specific date and time in the chart area. */ + getChartPosition(dateTime: Date): number; + /** Returns the actual width of the chart area. */ + getChartWidth(): number; + + /** Returns the date and time of a specific X coordinate in the chart area. */ + getDateTime(chartPosition: number): Date; + + /** Returns the next available working time in the schedule based on the specified date and time. */ + getWorkingTime(dateTime: Date): Date; + + getStartWorkingTime(dateTime: Date): Date; getFinishWorkingTime(dateTime: Date): Date; + + /** Returns the actual working effort (in milliseconds) required to complete a task that starts and finishes on the specified date and times. */ + getEffort(start: Date, finish: Date): number; + + /** Returns the actual finish date and time of a task that starts on the specified date and time and completes after the specified working effort (in milliseconds). */ + getFinish(start: Date, effort: number): Date; + + /** Returns the actual start date and time of a task that has completed after the specified working effort (in milliseconds) and finishes on the specified date and time. */ + getStart(effort: number, finish: Date): Date; + + /** Returns the completion rate (between 0 and 1) of a task that is scheduled between the specified start and finish date and times and has been completed up to the specified completed finish date and time. */ + getCompletion(start: Date, completedFinish: Date, finish: Date): number; + + /** Returns the completed finish date and time of a task that is scheduled between the specified start and finish date and times and has the specified completion rate (between 0 and 1). */ + getCompletedFinish(start: Date, completion: number, finish: Date): Date; + + getItemsHeight(): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + getRootItems(): Item[]; getLeafItems(): Item[]; getSummaryItems(): Item[]; + getProjectStart(): Date; getProjectFinish(): Date; + getProjectEffort(): number; getProjectCompletedEffort(): number; + getProjectTotalEffort(): number; getProjectTotalCompletedEffort(): number; + getProjectCompletion(): number; + + isItemCritical(item: Item): boolean; getCriticalItems(criticalDelay?: number): Item[]; + getPertCriticalItems(maxIndentation?: number): Item[]; + + ensureDependencyConstraints(): void; + + /** Sets up baseline start and baseline finish properties of standard and milestone task items based on their actual start and finish values; used as preparation for rescheduling the remaining work effort of a task item. */ + setupBaseline(): void; + + rescheduleItemToStart(item: Item, start: Date): void; + rescheduleItemToFinish(item: Item, finish: Date): void; + + /** Creates and inserts a partial copy of the specified task item considering its remaining work effort into the managed hierarchy, and updates the finish date and time of the original task item to its completion point. */ + splitRemainingWork(item: Item): void; + + /** Optimizes schedule times of all managed items in order to optimize the project finish date without leveling resources (optionally using single pass task leveling), respecting dependency constraints. */ + optimizeWork(dependenciesOnly?: boolean, includeStartedTasks?: boolean, start?: Date, singlePassTaskLeveling?: boolean): void; + + /** Levels the assigned allocation units assuming that all or the specified tasks within the control are fixed duration and effort driven; requires that assignmentsContent property of the task items is of type string, formatted as a list of resource names separated by commas, optionally having associated allocation percents declared between square brackets (e.g.: "John, Mary [50%], Diane [12.5%]"). */ + levelAllocations(items?: Item[]): void; + + /** Levels the assigned resources from all standard tasks within the control in order to avoid over allocation, by updating task timing values accordingly; requires that assignmentsContent property of the task items is of type string, formatted as a list of resource names separated by commas, optionally having associated allocation percents declared between square brackets (e.g.: "John, Mary [50%], Diane [12.5%]"); includeStartedTasks parameter indicates whether or not to consider already started tasks (i.e. having completion > 0), and start parameter specifies the date and time to consider for resource leveling algorithm. */ + levelResources(includeStartedTasks?: boolean, start?: Date): void; + + getItemSuccessors(item: Item): Item[]; + getItemSuccessorPredecessorItems(item: Item): PredecessorItem[]; + getItemAllocationUnits(item: Item): number; + getItemAssignments(item: Item): { key: any; value: number; }[]; + + /** Determines the list of the assignments of a specific task item, as strings indicating the assigned resource names. */ + getItemAssignedResources(item: Item): any[]; + + getResourceAssignments(resourceName: any): { key: Item; value: number; }[]; + + /** Determines the list of the assignments of a specific resource, as objects indicating the assigned task items. */ + getResourceAssignedItems(resourceName: any): Item[]; + + /** Determines the list of all assigned resources within the current project, as strings indicating their names. */ + getAssignedResources(): any[]; + + /** Returns a list of Schedule Chart items for the current project, optionally considering the minimum set of assignable resources specified as parameter; the Schedule Chart items may be displayed using a separate ScheduleChartView component instance. */ + getScheduleChartItems(assignableResources?: any[]): ScheduleChartView.Item[]; + + getItemAssignmentsCost(item: Item): number; getItemExtraCost(item: Item): number; + getItemCost(item: Item): number; setItemCost(item: Item, value: number): void; + getResourceCost(resourceName: string): number; + getProjectCost(): number; + + getAllocations(resourceName: any): { key: { start: Date; finish: Date }; value: number }[]; + + /** Returns a list of Load Chart items for the current project, optionally considering the set of resources specified as parameter; the Schedule Chart items may be displayed using a separate LoadChartView component instance. */ + getLoadChartItems(resources?: any[]): LoadChartView.Item[]; + + /** Returns a list of Load Chart items for the current project, considering the resource specified as parameter; the Schedule Chart items may be displayed using a separate LoadChartView component instance. */ + getLoadChartItems(resource: any): LoadChartView.Item[]; + + /** Returns a list of filtered read only Gantt Chart items for the current project, considering the set of resources specified as parameter; the read only Gantt Chart items may be displayed using a separate GanttChartView component instance. */ + getFilteredGanttChartItems(resources: any[]): Item[]; + + /** Returns a list of filtered read only Gantt Chart items for the current project, considering the resource specified as parameter; the read only Gantt Chart items may be displayed using a separate GanttChartView component instance. */ + getFilteredGanttChartItems(resource: any): Item[]; + + /** Returns a list of PERT Chart items for the current project, optionally considering the maximum indentation, and start, finish, and link content and suffixes values specified as parameters; the PERT Chart items may be displayed using a separate PertChartView component instance. */ + getPertChartItems(maxIndentation?: number, startContent?: string, finishContent?: string, linkContent?: string, completedContentSuffix?: string, startingContentSuffix?: string): Pert.PertChartView.Item[]; + + /** Returns a list of Network Diagram items for the current project, optionally considering the maximum indentation, and start and finish content values specified as parameters; the Network Diagram items may be displayed using a separate NetworkDiagramView component instance. */ + getNetworkDiagramItems(maxIndentation?: number, startContent?: string, finishContent?: string): Pert.NetworkDiagramView.Item[]; + + isInitializing: boolean; isInitialized: boolean; + + /** Copies the common settings of the current component instance to the specified target settings collection; a secondary component instance may be initialized using the output collection. */ + copyCommonSettings(targetSettings: Settings): void; + + /** Determines whether an item depends of another item by checking the hierarchy and predecessor items. */ + itemDependsOf(item: Item, otherItem: Item): boolean; + } + + /** Represents a task data item and its Gantt Chart representation. */ + interface Item { + /** The object that is displayed to represent the task item in the grid and in task bar tool tips, usually the task name. */ + content: any; + + /** The hierarchy is based on the indentation level values of the tasks, so that a task with a lower index in the collection and having a specific indentation level will become the parent task for the tasks with a higher index in the collection and having an increased indentation level. */ + indentation?: number; + + /** If a parent task is expanded its child tasks become visible. If a parent task is collapsed its child tasks become invisible. */ + isExpanded?: boolean; + + start: Date; finish?: Date; completedFinish?: Date; + + /** A milestone task is displayed in the Gantt Chart view using a different task bar template. */ + isMilestone?: boolean; + + /** Optionally defines specific working week and day intervals and special nonworking days to consider for scheduling purposes. */ + schedule?: Schedule; + + baselineStart?: Date; baselineFinish?: Date; + minStart?: Date; maxStart?: Date; minFinish?: Date; maxFinish?: Date; + isRelativeToTimezone?: boolean; + + /** The assignments content to be displayed in the Gantt Chart view next to the associated task bar, but it is not used internally for computing/updating task finish date and time (generating duration) based on any updated assignments. */ + assignmentsContent?: any; + + isReadOnly?: boolean; + isHidden?: boolean; + isBarVisible?: boolean; + isBarReadOnly?: boolean; + isSummaryEnabled?: boolean; + isParentSummarizationEnabled?: boolean; + + /** When set to true it would ensure that the original item's total effort is preserved when duration is updated by updating assignment allocation units, assuming that the item has resources assigned. */ + hasFixedEffort?: boolean; + + /** When specifically set to false, overrides GanttChartView.areTaskDependencyConstraintsEnabled = true (auto-scheduling) for an item, setting up manual scheduling. */ + areDependencyConstraintsEnabled?: boolean; + + displayRowIndex?: number; + + /** Optional array of parts to be represented for this group item in the chart area. */ + parts?: Item[]; + + "class"?: string; style?: string; + barClass?: string; standardBarClass?: string; completedBarClass?: string; summaryBarClass?: string; summaryCompletedBarClass?: string; milestoneBarClass?: string; baselineBarClass?: string; barStyle?: string; standardBarStyle?: string; completedBarStyle?: string; summaryBarStyle?: string; summaryCompletedBarStyle?: string; milestoneBarStyle?: string; baselineBarStyle?: string; + taskTemplate? (item: Item): SVGElement; + template? (item: Item): SVGElement; + + isSelected?: boolean; + + /** The predecessors collection defines predecessor items referring the task items that the current item depends of, and having the relations displayed in the Gantt Chart view as dependency lines, but it is not used internally for computing/updating task start and finish date and times (generating work time intervals) based on its defined dependencies. */ + predecessors?: PredecessorItem[]; + + executionCost?: number; + + /** The index of the item in the managed hierarchy. */ + index?: number; + + /** The summary item that includes this task considering indentation values, or null when there is no such parent summary item. */ + parent?: Item; + + /** Indicates whether the task is a summary item. */ + hasChildren?: boolean; + + /** When this task is a summary item (i.e. hasChildren is set to true), returns an array of its child items. */ + children?: Item[]; + + /** Indicates whether the task is visible within the hierarchy, i.e. it is not a descendent of a collapsed summary item. */ + isVisible?: boolean; + + /** Indicates whether the task is visible in the scrolling viewport of the control when virtualization is enabled. */ + isVirtuallyVisible?: boolean; + } + + /** Represents a depdendency between two task data items and its Gantt Chart representation. */ + interface PredecessorItem { + /** Task item that precedes the owner of the predecessor item (the item that the current item depends of). */ + item: Item; + + /** Indicates the type of the dependency; supported values are: FinishStart (default value), StartStart, FinishFinish, or StartFinish. */ + dependencyType?: string; + + /** Indicates an optional lag of the dependency (in milliseconds). */ + lag?: number; + + dependencyLineClass?: string; dependencyLineStyle?: string; + template? (item: Item, predecessorItem: PredecessorItem): SVGElement; + } + + /** Represents an object that defines working week and day intervals and special nonworking days either for an entire Gantt Chart or specific tasks. */ + interface Schedule { + /** The start day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Monday (1); previous days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekStart?: number; + /** The finish day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Friday (5); next days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekFinish?: number; + + /** The start time of the working day interval, in milliseconds passed since midnight; by default it is set to 8 AM; the start of the visible time interval of the day is also defined using the same value. */ + workingDayStart?: number; + /** The finish time of the working day interval, in milliseconds passed since midnight; by default it is set to 4 PM; the finish of the visible time interval of the day is also defined using the same value. */ + workingDayFinish?: number; + + /** Optional collection of special nonworking days, such as holidays. */ + specialNonworkingDays?: Date[]; + } + + /** Represents settings for a GanttChartView component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the interaction mode to generically apply to the control; Standard, and TouchEnabled interaction modes are supported; by default it is Standard. */ + interaction?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + isGridVisible?: boolean; gridWidth?: string; chartWidth?: string; + isSplitterEnabled?: boolean; splitterWidth?: number; splitterBackground?: string; + minGridWidth?: number; minChartWidth?: number; + + isReadOnly?: boolean; isGridReadOnly?: boolean; isChartReadOnly?: boolean; isContentReadOnly?: boolean; isAssignmentsContentReadOnly?: boolean; isTaskStartReadOnly?: boolean; isTaskEffortReadOnly?: boolean; isTaskCompletionReadOnly?: boolean; areTaskPredecessorsReadOnly?: boolean; + + /** Indicates whether effort is preserved for tasks when end users change their start value from the default Start column in the grid; by default it is set to false. */ + isTaskEffortPreservedWhenStartChangesInGrid?: boolean; + + headerBackground?: string; headerHeight?: number; + itemHeight?: number; + + /** Collection of objects indicating the columns to be presented in the grid. */ + columns?: Column[]; + + itemClass?: string; itemStyle?: string; + standardItemClass?: string; summaryItemClass?: string; milestoneItemClass?: string; standardItemStyle?: string; summaryItemStyle?: string; milestoneItemStyle?: string; + + selectedItemClass?: string; selectedItemStyle?: string; + + /** Indicates the selection behavior; support values are None (not allowed), Focus (single item selected triggered by focus), Single (single item selection using check box), Extended (multiple item selection using check boxes), and ExtendedFocus (multiple item selection using check boxes or triggered by focus); by default it is set to Focus. */ + selectionMode?: string; + + indentationLevelWidth?: number; + + cellClass?: string; cellStyle?: string; + toggleButtonClass?: string; toggleButtonHoveringClass?: string; toggleButtonStyle?: string; toggleButtonHoveringStyle?: string; + collapsedToggleButtonTemplate? (): HTMLElement; expandedToggleButtonTemplate? (): HTMLElement; + + /** Date and time to scroll to within the chart view. */ + displayedTime?: Date; + + /** Date and time to highlight (using a vertical bar) within the chart view. */ + currentTime?: Date; + + /** Start date and time of the scrollable chart area. */ + timelineStart?: Date; + + /** Start date and time of the scrollable chart area. */ + timelineFinish?: Date; + + isRelativeToTimezone?: boolean; + + /** Collection of objects indicating the scales to be presented in the chart. */ + scales?: Scale[]; + + /** Time interval length (in milliseconds) to be used to dynamically round date and time during drag and drop update operations; by default it is set to quarter-hour (15 minutes). */ + updateScale?: number; + + /** Indicates the zoom level to be used for the chart area, and represents the actual number of pixels each hour in the timeline gets available; to zoom in, increase this value; to zoom out, decrease it; by default it is set to 2.5. */ + hourWidth?: number; + + /** The start day of the visible week interval; by default it is set to Sunday (0). */ + visibleWeekStart?: number; + /** The finish day of the visible week interval; by default it is set to Saturday (6). */ + visibleWeekFinish?: number; + + /** The start day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Monday (1); previous days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekStart?: number; + /** The finish day of the working week interval, used when computing task effort values and when dragging and dropping task bars; by default it is set to Friday (5); next days of the week are considered nonworking time and by default they are highlighted in the chart area. */ + workingWeekFinish?: number; + + /** The start time of the visible day interval, in milliseconds passed since midnight; by default it is set to 8 AM; the start of the working time interval of the day is also defined using the same value. */ + visibleDayStart?: number; + /** The finish time of the visible day interval, in milliseconds passed since midnight; by default it is set to 4 PM; the finish of the working time interval of the day is also defined using the same value. */ + visibleDayFinish?: number; + + /** Optional collection of special nonworking days, such as holidays. */ + specialNonworkingDays?: Date[]; + + /** Allows initializing working week and day intervals and special nonworking days to consider for scheduling purposes using an alternative definition object. */ + schedule?: Schedule; + + barMargin?: number; barHeight?: number; barCornerRadius?: number; + completedBarMargin?: number; completedBarHeight?: number; completedBarCornerRadius?: number; + + styleDefinitionTemplate? (ganttChartView?: Element): SVGDefsElement; + standardBarClass?: string; summaryBarClass?: string; milestoneBarClass?: string; standardBarStyle?: string; summaryBarStyle?: string; milestoneBarStyle?: string; + standardCompletedBarClass?: string; standardCompletedBarStyle?: string; + summaryCompletedBarClass?: string; summaryCompletedBarStyle?: string; + collapsedSummaryLineClass?: string; collapsedSummaryLineStyle?: string; + dependencyPointerClass?: string; dependencyPointerStyle?: string; + dependencyLineClass?: string; dependencyLineStyle?: string; + temporaryDependencyLineClass?: string; temporaryDependencyLineStyle?: string; + assignmentsClass?: string; assignmentsStyle?: string; + standardTaskTemplate? (item: Item): SVGElement; summaryTaskTemplate? (item: Item): SVGElement; milestoneTaskTemplate? (item: Item): SVGElement; + extraTaskTemplate? (item: Item): SVGElement; + + isTaskToolTipVisible?: boolean; + itemTemplate? (item: Item): SVGElement; + + areTaskAssignmentsVisible?: boolean; + assignmentsTemplate? (item: Item): SVGElement; + + isTaskCompletedEffortVisible?: boolean; + isSummaryTaskCompletedEffortVisible?: boolean; + + isIndividualItemNonworkingTimeHighlighted?: boolean; areTaskInterruptionsHighlighted?: boolean; + + areTaskDependenciesVisible?: boolean; + allowCreatingStartDependencies?: boolean; allowCreatingToFinishDependencies?: boolean; + dependencyLineTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + isDependencyToolTipVisible?: boolean; + predecessorItemTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + areToolTipsSimplified?: boolean; + + isDraggingTaskStartEndsEnabled?: boolean; + + visibilityFilter? (item: Item): boolean; + + /** Determines whether dependency constraints are enabled in the chart, providing auto-scheduling features for dependent tasks; by default is it set to false for optimization purposes. */ + areTaskDependencyConstraintsEnabled?: boolean; + + /** Determines whether dependency constraints are automatically ensured even while dragging task bars in the control (or only when the operation completes), when areTaskDependencyConstraintsEnabled property is set to true; by default it is set to false. */ + areTaskDependencyConstraintsEnabledWhileDragging?: boolean; + + /** Determines whether dependency constraints are disabled when the predecessor item is created using drag and drop operations in the chart, when areTaskDependencyConstraintsEnabled is set to false; by default it is set to false. */ + areTaskDependencyConstraintsDisabledWhenDropping?: boolean; + + areDependencyConstraintsAppliedOnStartedTasks?: boolean; + areDependencyConstraintsAppliedOnMilestones?: boolean; + + isBaselineVisible?: boolean; + + allowUserToResizeColumns?: boolean; + minColumnWidth?: number; + maxColumnWidth?: number; + + isGridRowClickTimeScrollingEnabled?: boolean; + + isMouseWheelZoomEnabled?: boolean; + isMouseWheelZoomEnabledMinHourWidth?: number; + isMouseWheelZoomEnabledMaxHourWidth?: number; + + /** The collection of resource names available for task assignments */ + assignableResources?: string[]; + autoAppendAssignableResources?: boolean; + + /** Quantity values to consider when leveling resources, indicating maximum amounts of materials available for use at the same time. */ + resourceQuantities?: { key: string; value: number }[]; + maxLoadChartDisplayedResourceQuantity?: number; + + /** Resource schedules */ + resourceSchedules?: { key: string; value: Schedule }[]; + + taskInitiationCost?: number; + defaultResourceUsageCost?: number; + specificResourceUsageCosts?: { key: string; value: number }[]; + defaultResourceHourCost?: number; + specificResourceHourCosts?: { key: string; value: number }[]; + + alternativeItemClass?: string; alternativeChartItemClass?: string; alternativeItemStyle?: string; alternativeChartItemStyle?: string; + + gridLines?: string; horizontalGridLines?: string; verticalGridLines?: string; horizontalChartLines?: string; + + /** Indicates whether the control will create task bars only when they need to be presented (such as only when scrolling the view to their positions); by default it is set to true for optimization purposes. */ + isVirtualizing?: boolean; + + /** The input type to use for the default start and finish cell value editors in the grid; "text" by default. */ + dateTimePickerType?: string; + + /** Indicates whether to use date picker controls for start and finish date cells in the grid when date time picker type is set to "text" and the required data control library is available. */ + useDatePicker?: boolean; + + /** Indicates the number of calendar selector levels that may be displayed on date picker controls; supported values: 1: months, 2: + years, 3: + decades. */ + calendarSelectorLevels?: number; + + /** Indicates whether to use time picker besides date picker controls (when useDatePicker is set to true) for start and finish date cells when the required data control library is available. */ + useTimePicker?: boolean; + + /** Indicates whether to use multi-selector combo box controls for assignment cells in the grid when the required data control library is available. */ + useResourceSelector?: boolean; + + /** Indicates whether to use tool tip controls for updating task start, finish, completion, dependencies, and/or assignments in the chart using drag and drop operations when the required data control library is available. */ + useUpdatingToolTips?: boolean; + + /** Names of the months to use at presentation time. */ + months?: string[]; + /** Names of the days of the week to use at presentation time. */ + daysOfWeek?: string[]; + + /** Day of the week to consider as week start; by default it is set to Sunday (0); to set it to Monday use one (1). */ + weekStartDay?: number; + + /** Converts date values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateFormatter? (date: Date): string; + /** Converts date and time values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateTimeFormatter? (dateTime: Date): string; + /** Converts text values to date and time values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateTimeParser? (text: string): Date; + + /** Function called whenever the end user scrolls the chart area horizontally, changing the left most displayed time (settings.displayedTime). */ + displayedTimeChangeHandler? (displayedTime: Date): void; + /** Function called whenever the end user performs mouse wheel zooming on the chart area, changing the zoom level (settings.hourWidth). */ + hourWidthChangeHandler? (hourWidth: number): void; + /** Function called whenever the end user resizes the grid and chart areas horizontally, changing the splitter position (settings.gridWidth and settings.chartWidth). */ + splitterPositionChangeHandler? (gridWidth: number, chartWidth: number): void; + /** Function called whenever the end user resizes a grid column, changing its width (column.width). */ + columnWidthChangeHandler? (column: Column, width: number): void; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control, when using the default grid columns and task template functions. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + /** Function called whenever summary item expansion state changes within the control, providing the expanded or collapsed item, and a Boolean value indicating the updated expansion state, specified as parameters. */ + itemExpansionChangeHandler? (item: Item, isExpanded: boolean): void; + /** Function called whenever item selection changes within the control, providing the selected or unselected item, a Boolean value indicating the updated selection state, and a Boolean value indicating whether this change was directly triggered by the user, specified as parameters. */ + itemSelectionChangeHandler? (item: Item, isSelected: boolean, isDirect: boolean): void; + + /** Function called whenever an item is moved in the managed list of the control, providing the item, source and target positions of the item, specified as parameters. */ + itemMoveHandler? (item: Item, fromIndex: number, toIndex: number): void; + + itemContextMenuHandler? (e: Event, item: Item): void; + predecessorItemContextMenuHandler? (e: Event, predecessorItem: PredecessorItem, targetItem: Item): void; + + mouseHandler? (eventName: string, isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date, button: number, clickCount: number, e: MouseEvent): void; + mouseMoveHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date): void; + mouseDownHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date, button: number): void; + clickHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date): void; + doubleClickHandler? (isOnItemsArea: boolean, isOnChart: boolean, row: Item|Scale, column: Column|Date): void; + itemClickHandler? (isOnChart: boolean, item: Item, column: Column|Date): void; + itemDoubleClickHandler? (isOnChart: boolean, item: Item, column: Column|Date): void; + chartClickHandler? (isOnItemsArea: boolean, row: Item|Scale, dateTime: Date): void; + chartDoubleClickHandler? (isOnItemsArea: boolean, row: Item|Scale, dateTime: Date): void; + chartItemClickHandler? (item: Item, dateTime: Date): void; + chartItemDoubleClickHandler? (item: Item, dateTime: Date): void; + dependencyLineClickHandler? (predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + dependencyLineDoubleClickHandler?(predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + + invalidPredecessorDetectionHandler?(predecessorItem: PredecessorItem, targetitem: Item, sourceItem: Item): void; + } + + /** Represents a grid column displayed by the GanttChartView component. */ + interface Column { + isTreeView?: boolean; + + header: any; + width: number; minWidth?: number; maxWidth?: number; + + isReadOnly?: boolean; allowUserToResize?: boolean; + isSelection?: boolean; + + headerClass?: string; headerStyle?: string; + cellClass?: string; cellStyle?: string; + + /** Function that returns the output (document node) to be presented within the grid cell of this column in the standard view, for a specific item received as parameter. */ + cellTemplate(item: Item): HTMLElement; + + exportCellTemplate? (item: Item): HTMLElement; + } + + /** Represents a chart scale displayed by the GanttChartView component. */ + interface Scale { + /** Type of the scale; supported values are: Years, Months, Weeks, Days, Hours, NonworkingTime (highlighting weekends), CurrentTime (current time vertical bar), FutureTime (current time vertical bar with future highlighting support), and Custom (the developer needs to also set the intervals collection in this case, using time interval objects defined by start and finish properties). */ + scaleType: string; + + isHeaderVisible?: boolean; headerHeight?: number; + + /** Format to use for scale header texts; supported values are: DateTime, Date, Hour, DayOfWeek, DayOfWeekAbbreviation, Day, Month, MonthAbbreviation, Year, MonthYear, Localized, and Custom (the developer needs to also set the headerText property of each interval object within the intervals collection of the scale object in this case), or a function that converts a Date parameter to a presentation string. */ + headerTextFormat?: any; + + headerClass?: string; headerStyle?: string; + + isHighlightingVisible?: boolean; + highlightingClass?: string; highlightingStyle?: string; + + isSeparatorVisible?: boolean; + separatorClass?: string; separatorStyle?: string; + + intervals?: ScaleInterval[]; + } + + /** Represents an interval for a custom scale displayed by the GanttChartView component. */ + interface ScaleInterval { + start: Date; finish: Date; + headerText?: string; + } + + /** Represents export settings for a GanttChartView component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + isGridVisible?: boolean; + columnIndexes?: number[]; + timelineStart?: Date; timelineFinish?: Date; + hourWidth?: number; + startRowIndex?: number; endRowIndex?: number; + rotate?: boolean; + autoClose?: boolean; + } + } + + /** Represents a control that presents resource and assigned task data items using a Schedule Chart and an associated grid. */ + module ScheduleChartView { + /** + * Initializes a ScheduleChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items resource data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): GanttChartView.Column[]; + + /** Returns an array of default definitions that you can further customize and use as value for the scales property of the control settings used at initialization time. */ + function getDefaultScales(settings: Settings): GanttChartView.Scale[]; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultStandardTaskTemplate(items: GanttChartView.Item[], controlElement: Element, settings: Settings): (item: GanttChartView.Item) => SVGElement; + function getDefaultMilestoneTaskTemplate(items: GanttChartView.Item[], controlElement: Element, settings: Settings): (item: GanttChartView.Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: GanttChartView.Item) => SVGElement; + function getDefaultAssignmentsTemplate(settings: Settings): (item: GanttChartView.Item) => SVGElement; + + /** Inside task template functions, sets up task drag and drop behavior for the non-null SVG elements specified to be designed as thumbs, considering the specified item and item positioning in the chart. */ + function initializeTaskDraggingThumbs(startThumb: SVGElement, startOnlyThumb: SVGElement, finishThumb: SVGElement, completedFinishThumb: SVGElement, item: GanttChartView.Item, itemLeft: number, itemRight: number, itemCompletedRight: number): void; + + /** Inside task template functions, sets up assignment update drag and drop behavior for the non-null SVG element specified to be designed as a thumb inside its specified container group that would be used to supplementary present temporary assignment target rectangles during drag and drop operations, considering the specified item and item positioning in the chart. */ + function initializeAssignmentDraggingThumb(thumb: SVGElement, containerGroup: SVGGElement, item: GanttChartView.Item, itemTop: number, itemRight: number): void; + + function getWorkingTime(dateTime: Date, settings: Settings): Date; + function getEffort(start: Date, finish: Date, settings: Settings): number; + function getFinish(start: Date, effort: number, settings: Settings): Date; + function getStart(effort: Date, finish: number, settings: Settings): Date; + function getCompletion(start: Date, completedFinish: Date, finish: Date, settings: Settings): number; + function getCompletedFinish(start: Date, completion: number, finish: Date, settings: Settings): number; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides ScheduleChartView component services. */ + interface Element extends GanttChartView.Element { + scheduleChartItems: Item[]; + settings: Settings; + + refreshScheduleChartItem(item: Item): void; + + insertScheduleChartItem(index: number, item: Item): void; addScheduleChartItem(item: Item): void; insertScheduleChartItems(index: number, items: Item[]): void; addScheduleChartItems(items: Item[]): void; + removeScheduleChartItem(item: Item): void; removeScheduleChartItems(items: Item[]): void; + moveScheduleChartRange(fromIndex: number, count: number, toIndex: number): void; + moveScheduleChartItem(item: Item, toIndex: number); + moveScheduleChartItemUp(item: Item): void; moveScheduleChartItemDown(item: Item): void; + + setItemContent(item: Item, value: any): void; + + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + + scrollToItem(item: Item): void; + + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + isScheduleChartInitializing: boolean; isScheduleChartInitialized: boolean; + } + + /** Represents a resource data item and its Schedule Chart representation. */ + interface Item extends GanttChartView.Item { + /** The object that is displayed to represent the resource item in the grid, usually the resource name. */ + content: any; + + /** Task data items assigned to the current resource. */ + ganttChartItems: GanttChartView.Item[]; + + /** The index of the item in the Schedule Chart item collection. */ + scheduleChartIndex?: number; + } + + /** Represents settings for a ScheduleChartView component. */ + interface Settings extends GanttChartView.Settings { + areAssignmentsReadOnly?: boolean; + + assignmentThumbClass?: string; assignmentThumbStyle?: string; + temporaryAssignmentThumbClass?: string; temporaryAssignmentThumbStyle?: string; + + assignmentThumbTemplate? (item: GanttChartView.Item): SVGElement; + temporaryAssignmentThumbTemplate? (document: HTMLDocument, x: number, y: number, width: number, height: number): SVGElement; + } + } + + /** Represents a control that presents resource and allocation data items using a Load Chart and an associated grid. */ + module LoadChartView { + /** + * Initializes a LoadChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items resource data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + /** Returns an array of default definitions that you can further customize and use as value for the columns property of the control settings used at initialization time. */ + function getDefaultColumns(items: Item[], settings: Settings): GanttChartView.Column[]; + + /** Returns an array of default definitions that you can further customize and use as value for the scales property of the control settings used at initialization time. */ + function getDefaultScales(settings: Settings): GanttChartView.Scale[]; + + function getDefaultAllocationTemplate(items: GanttChartView.Item[], controlElement: Element, settings: Settings): (item: AllocationItem) => SVGElement; + + function getWorkingTime(dateTime: Date, settings: Settings): Date; + + function textColumnTemplateBase(document: HTMLDocument, valueGetter: () => any, isVisibleGetter?: () => boolean): HTMLElement; + function textInputColumnTemplateBase(document: HTMLDocument, width: number, valueGetter: () => any, valueSetter: (value: any) => void, isEnabledGetter?: () => boolean, isVisibleGetter?: () => boolean, isBoldGetter?: () => boolean): HTMLElement; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides LoadChartView component services. */ + interface Element extends ScheduleChartView.Element { + loadChartItems: Item[]; + settings: Settings; + + refreshLoadChartItem(item: Item): void; + + insertLoadChartItem(index: number, item: Item): void; addLoadChartItem(item: Item): void; insertLoadChartItems(index: number, items: Item[]): void; addLoadChartItems(items: Item[]): void; + removeLoadChartItem(item: Item): void; removeLoadChartItems(items: Item[]): void; + moveLoadChartRange(fromIndex: number, count: number, toIndex: number): void; + moveLoadChartItem(item: Item, toIndex: number); + moveLoadChartItemUp(item: Item): void; moveLoadChartItemDown(item: Item): void; + + setItemContent(item: Item, value: any): void; + + getCurrentItem(): Item; + getSelectedItem(): Item; getSelectedItems(): Item[]; + selectItem(item: Item): void; unselectItem(item: Item): void; + + scrollToItem(item: Item): void; + + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + isLoadChartInitializing: boolean; isLoadChartInitialized: boolean; + } + + /** Represents a resource data item and its Load Chart representation. */ + interface Item extends ScheduleChartView.Item { + /** Allocation data items assigned to the current resource. */ + ganttChartItems: AllocationItem[]; + + /** The index of the item in the Load Chart item collection. */ + loadChartIndex?: number; + } + + interface AllocationItem extends GanttChartView.Item { + finish: Date; + + /** Indicates the capacity used from the assigned resource item during the time interval represented by the current allocation item. */ + units: number; + } + + /** Represents settings for a LoadChartView component. */ + interface Settings extends ScheduleChartView.Settings { + /** The maximum allocation units that are to be displayed as a full height bar in in the chart. */ + maxDisplayedUnits?: number; + + normalAllocationBarClass?: string; underAllocationBarClass?: string; overAllocationBarClass?: string; normalAllocationBarStyle?: string; underAllocationBarStyle?: string; overAllocationBarStyle?: string; + allocationTemplate? (item: AllocationItem): SVGElement; + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js new file mode 100644 index 000000000..6c5395a1c --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.js @@ -0,0 +1,531 @@ +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.17.0",copyright:"Copyright \u00a9 2012-2020 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"}); +DlhSoft.buildReleaseDate=function(c,N,P){c=new Date(c,N-1,P);return c>DlhSoft.buildReleaseDate?c:DlhSoft.buildReleaseDate}(2020,11,25);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var c=_0x5c25[1],N=_0x5c25[2],P=[],aa=[],ha=_0x5c25[3],ia=function(T,K){if(typeof T!==N||typeof K!==N)return!1;if(K==ha)return!0;var ba=K[_0x5c25[11]](_0x5c25[10]);if(0<=ba){var M=K[_0x5c25[12]](0,ba),I,L=M[_0x5c25[11]](_0x5c25[10]);if(0<=L)try{I=new Date(parseInt(M[_0x5c25[12]](L+1)))}catch(Q){}typeof I===c&&(I=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>I)return!1;M=M+_0x5c25[10]+T;for(i=I=0;iI&&(I=Math[_0x5c25[15]](2,32)-I);M=I.toString(16)[_0x5c25[16]]();ba=K[_0x5c25[12]](ba+1);if(M==ba)return!0}return!1},W=function(T,K,N,M,I){var L=_0x5c25[17],Q=_0x5c25[18],V=typeof ComponentSource===c||!ComponentSource?Q+_0x5c25[19]+M+_0x5c25[20]+I:_0x5c25[21],P=M+_0x5c25[22]+I+_0x5c25[23],W=_0x5c25[24],x=_0x5c25[25],o=_0x5c25[26];setTimeout(function(){var c=T[_0x5c25[27]],s=c[_0x5c25[29]](_0x5c25[28]);s[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var q=c[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);q[_0x5c25[35]](v);v[_0x5c25[35]](c[_0x5c25[36]](L));q[_0x5c25[35]](c[_0x5c25[36]](W+_0x5c25[10]));v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);v[_0x5c25[35]](c[_0x5c25[36]](K));q[_0x5c25[35]](v);q[_0x5c25[35]](c[_0x5c25[36]](x+_0x5c25[10]));v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);v[_0x5c25[35]](c[_0x5c25[36]](P));q[_0x5c25[35]](v);q[_0x5c25[35]](c[_0x5c25[36]](o+ +_0x5c25[10]));v=c[_0x5c25[29]](_0x5c25[28]);v[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var C=c[_0x5c25[29]](_0x5c25[39]);C[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);C[_0x5c25[32]](_0x5c25[41],V);C[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);C[_0x5c25[35]](c[_0x5c25[36]](_0x5c25[44]));v[_0x5c25[35]](C);C=c[_0x5c25[29]](_0x5c25[39]);C[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);C[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);C[_0x5c25[35]](c[_0x5c25[36]](_0x5c25[47]));C[_0x5c25[50]](_0x5c25[48],function(){T[_0x5c25[49]](s);aa[_0x5c25[7]](N)}, +!1);v[_0x5c25[35]](C);q[_0x5c25[35]](v);s[_0x5c25[35]](q);T[_0x5c25[35]](s)},0);setTimeout(function(){alert(L+_0x5c25[51]+W+_0x5c25[52]+K+_0x5c25[51]+x+_0x5c25[53]+P+_0x5c25[51]+o+_0x5c25[4])},6E5)};return{setLicense:function(c,K){P[_0x5c25[7]]({type:c,content:K})},validate:function(T,K,ba,M,I,L,Q){for(var K=K+_0x5c25[4]+ba,V=0;V0?a.insertBefore(b,a.childNodes[0]):a.appendChild(b)}catch(d){}},0)};C.addEventListener("mousedown",w,true);u.addEventListener("mouseup",w,true);a.resetChartAreaDefinitions=w;r.appendChild(C);r.chartArea=C;if(typeof e.extraSpaceHeight!==c){w=u.createElement("div");w.setAttribute("style","overflow: hidden; width: "+q+"px; height: "+e.extraSpaceHeight+"px");F.appendChild(w);F.chartExtraSpace=w}var x,z,y;setTimeout(function(){x=a.offsetWidth;z=a.offsetHeight;y=J.offsetHeight},0); +typeof a.splitterUpdateTimer!==c&&clearInterval(a.splitterUpdateTimer);a.splitterUpdateTimer=setInterval(function(){try{if(typeof p.x===c&&!(a.offsetWidth<=0)){var b=a.offsetWidth,d=J.offsetHeight,g=screen.deviceXDPI;if(b!=x||g!=screen.deviceXDPI){var m=typeof t.percent!==c?t.percent*b:t.offsetWidth,j=J.offsetWidth,f=Math.max(1,e.minGridWidth),l=Math.max(1,e.minChartWidth);if(m0&&u>0&&setTimeout(function(){e.splitterPositionChangeHandler(h,u)},0)}x=b;z=d}else if(d!=y){Ba(p,t,e);y=d}}}catch(w){try{clearInterval(a.splitterUpdateTimer)}catch(F){}}},100);typeof a.heightUpdateTimer!==c&&clearInterval(a.heightUpdateTimer);a.heightUpdateTimer=setInterval(function(){try{if(!(a.clientHeight<=0)){var b= +a.clientHeight;if(b!=z){var c=I(a,d,e);o.style.height=c;F.style.height=c;Ba(p,t,e);if(F.style.height!="auto")r.availableHeight=F.clientHeight;ta(r,ua(d,e));va(d,F,e);z=b}}}catch(g){try{clearInterval(a.heightUpdateTimer)}catch(m){}}},100);var A=function(a,b,g,m,j,f){var l;if(e.mouseHandler||e.mouseMoveHandler&&f=="mousemove"||e.mouseDownHandler&&f=="mousedown"||(e.clickHandler||e.itemClickHandler||e.chartClickHandler||e.chartItemClickHandler)&&f=="click"||(e.doubleClickHandler||e.itemDoubleClickHandler|| +e.chartDoubleClickHandler||e.chartItemDoubleClickHandler)&&f=="dblclick"){var n=a.which;!n&&a.button&&(a.button&1?n=1:a.button&4?n=2:a.button&2&&(n=3));l=j.getBoundingClientRect();var h=u.body,p=u.documentElement,j=l.left+(window.pageXOffset||p.scrollLeft||h.scrollLeft)-(p.clientLeft||h.clientLeft||0);l=Math.round(l.top+(window.pageYOffset||p.scrollTop||h.scrollTop)-(p.clientTop||h.clientTop||0));var j=Math.round(j),j=a.pageX-j,p=a.pageY-l,t=l=0,w,F;if(g)for(h=0;h0&&(ka=e.headerHeight/o);for(h=0;h0;)v.removeChild(v.childNodes[f]);var l= +[];for(f=C.childNodes.length;f-- >1;){var n=C.childNodes[f];if(n!=r.chartAreaAlternativeRows){n.tag!="Scale-Highlighting"&&(n.tag!="Scale-Highlighting-CurrentTime"&&n.tag!="Scale-Separator"&&n.tag!="Scale-Separator-CurrentTime")&&l.push(n);C.removeChild(n)}}hb(v,C,e.scales,e);for(f=0;f0;)C.appendChild(l[f]);ta(r,ua(d,e));F.scrollLeft=m*(a/j)-(m-g);setTimeout(function(){B= +false},200)}};a.setHourWidth=D;if(typeof e.isMouseWheelZoomEnabled===c||e.isMouseWheelZoomEnabled){b=function(b){b.preventDefault();b.stopPropagation();if(!B){var d=typeof b.wheelDelta!==c?b.wheelDelta>=0?1:-1:typeof b.detail!==c?-b.detail>=0?1:-1:0,e=a.settings,g=e.hourWidth,m=typeof e.isMouseWheelZoomEnabledMinHourWidth!==c?e.isMouseWheelZoomEnabledMinHourWidth:1;if(d<0)g=g/(1.2*-d);else if(d>0){g=g*1.2*d;d=typeof e.isMouseWheelZoomEnabledMaxHourWidth!==c?e.isMouseWheelZoomEnabledMaxHourWidth:20; +g>d&&(g=d)}g=a.visibleDayFinish){a.visibleWeekStart=0;a.visibleWeekFinish= +864E5}if(typeof a.visibleWeekStart===c)a.visibleWeekStart=0;if(typeof a.visibleWeekFinish===c)a.visibleWeekFinish=6;if(a.visibleWeekStart>a.visibleWeekFinish)if(a.visibleWeekStart==a.visibleWeekFinish+1){a.visibleWeekStart=0;a.visibleWeekFinish=6}else a.visibleWeekFinish=a.visibleWeekStart;if(typeof a.workingWeekStart===c)a.workingWeekStart=1;if(typeof a.workingWeekFinish===c)a.workingWeekFinish=5;if(a.workingWeekStart>a.workingWeekFinish)if(a.workingWeekStart==a.workingWeekFinish+1){a.workingWeekStart= +0;a.workingWeekFinish=6}else a.workingWeekFinish=a.workingWeekStart;a.workingDayStart=a.visibleDayStart;a.workingDayFinish=a.visibleDayFinish;if(typeof a.barMargin===c)a.barMargin=a.itemHeight/4;if(typeof a.barHeight===c)a.barHeight=a.itemHeight-a.barMargin*2;if(typeof a.barCornerRadius===c)switch(a.theme){default:a.barCornerRadius=0;break;case "Aero":a.barCornerRadius=3}if(typeof a.completedBarMargin===c)a.completedBarMargin=a.barHeight/2.5;if(typeof a.completedBarHeight===c)a.completedBarHeight= +a.barHeight-a.completedBarMargin*2;if(typeof completedBarCornerRadius===c)a.completedBarCornerRadius=0;if(typeof a.styleDefinitionTemplate===c)a.styleDefinitionTemplate=Fb(e,a);if(typeof a.standardBarStyle===c&&a.standardBarClass==null)switch(a.theme){default:a.standardBarStyle="fill: #8abbed; fill-opacity: 0.8; stroke: #8abbed; stroke-width: 0.65px";break;case "ModernBordered":a.standardBarStyle="fill: #8abbed; fill-opacity: 0.8; stroke: Blue; stroke-width: 0.65px";break;case "Aero":a.standardBarStyle= +"fill: url(#BlueGradient); fill-opacity: 0.8; stroke: Blue"}if(typeof a.standardCompletedBarStyle===c&&a.standardCompletedBarClass==null)switch(a.theme){default:a.standardCompletedBarStyle="fill: #3b87d9; stroke: #3b87d9; stroke-width: 0.65px";break;case "Aero":a.standardCompletedBarStyle="fill: #808080; stroke: #202020; stroke-width: 0.65px"}if(typeof a.summaryBarStyle===c&&a.summaryBarClass==null)switch(a.theme){default:a.summaryBarStyle="fill: #607080; stroke: #607080; stroke-width: 0.65px";break; +case "ModernBordered":a.summaryBarStyle="fill: #607080; stroke: #202020; stroke-width: 0.65px";break;case "Aero":a.summaryBarStyle="fill: url(#BlackGradient); stroke: Black"}if(typeof a.summaryCompletedBarStyle===c&&a.summaryCompletedBarClass==null)switch(a.theme){default:a.summaryCompletedBarStyle="fill: #404040; stroke: #404040; stroke-width: 0.65px";break;case "Aero":a.summaryCompletedBarStyle="fill: #a0a0a0; stroke: #303030; stroke-width: 0.65px"}if(typeof a.collapsedSummaryLineStyle===c&&a.collapsedSummaryLineClass== +null)a.collapsedSummaryLineStyle="stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2 2";if(typeof a.milestoneBarStyle===c&&a.milestoneBarClass==null)switch(a.theme){default:a.milestoneBarStyle="fill: #607080; stroke: #607080; stroke-width: 0.65px";break;case "ModernBordered":a.milestoneBarStyle="fill: #607080; stroke: #202020; stroke-width: 0.65px";break;case "Aero":a.milestoneBarStyle="fill: url(#BlackGradient); stroke: Black"}if(typeof a.baselineBarStyle===c&&a.baselineBarClass==null)switch(a.theme){default:a.baselineBarStyle= +"fill: none; stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2";break;case "Aero":a.baselineBarStyle="fill: none; stroke: Blue; stroke-dasharray: 2, 2"}if(typeof a.dependencyPointerStyle===c&&a.dependencyPointerClass==null)switch(a.theme){default:a.dependencyPointerStyle="fill: #3b87d9; stroke: #3b87d9; stroke-width: 0.65px";break;case "Aero":a.dependencyPointerStyle="fill: Blue; stroke: Blue"}if(typeof a.dependencyLineStyle===c&&a.dependencyLineClass==null)switch(a.theme){default:a.dependencyLineStyle= +"stroke: #3b87d9; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)";break;case "Aero":a.dependencyLineStyle="stroke: Blue; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)"}if(typeof a.dependencyLineZoneStyle===c&&a.dependencyLineZoneClass==null)a.dependencyLineZoneStyle="stroke: White; stroke-opacity: 0; stroke-width: 4px; fill: none";if(typeof a.temporaryDependencyLineStyle===c&&a.temporaryDependencyLineClass==null)switch(a.theme){default:a.temporaryDependencyLineStyle= +"stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#ArrowMarker)";break;case "Aero":a.temporaryDependencyLineStyle="stroke: Blue; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#ArrowMarker)"}if(typeof a.assignmentsStyle===c&&a.assignmentsClass==null)a.assignmentsStyle="stroke-width: 0.25px; font-size: x-small";if(typeof a.standardTaskTemplate===c)a.standardTaskTemplate=Gb();if(typeof a.summaryTaskTemplate===c)a.summaryTaskTemplate= +Hb();if(typeof a.milestoneTaskTemplate===c)a.milestoneTaskTemplate=Ib();if(typeof a.horizontalChartLines!==c){var n=a.internalPreTaskTemplate;a.internalPreTaskTemplate=function(b){if(typeof b.scheduleChartItem!==c)return typeof n!==c?n(b):null;var d=b.ganttChartView.ownerDocument,e=d.createElementNS("http://www.w3.org/2000/svg","g");typeof n!==c&&e.appendChild(n(b));var g=d.createElementNS("http://www.w3.org/2000/svg","line");g.setAttribute("x1",0);g.setAttribute("y1",-0.5);g.setAttribute("x2",H(a.timelineFinish, +a));g.setAttribute("y2",-0.5);g.setAttribute("style","stroke: "+a.horizontalChartLines+"; stroke-width: 0.5px");e.appendChild(g);if(b.index==b.ganttChartView.items.length-1){g=d.createElementNS("http://www.w3.org/2000/svg","line");g.setAttribute("x1",0);g.setAttribute("y1",a.itemHeight+0.5);g.setAttribute("x2",H(a.timelineFinish,a));g.setAttribute("y2",a.itemHeight+0.5);g.setAttribute("style","stroke: "+a.horizontalChartLines+"; stroke-width: 0.5px");e.appendChild(g)}return e}}if(typeof a.isTaskToolTipVisible=== +c)switch(a.target){default:a.isTaskToolTipVisible=true;break;case "Phone":a.isTaskToolTipVisible=false}if(typeof a.itemTemplate===c)a.itemTemplate=Jb(a);if(typeof a.areTaskAssignmentsVisible===c)a.areTaskAssignmentsVisible=true;if(typeof a.assignmentsTemplate===c)a.assignmentsTemplate=Kb();if(typeof a.isTaskCompletedEffortVisible===c)a.isTaskCompletedEffortVisible=true;if(typeof a.areTaskDependenciesVisible===c)a.areTaskDependenciesVisible=true;if(typeof a.dependencyLineTemplate===c)a.dependencyLineTemplate= +Lb();if(typeof a.isDependencyToolTipVisible===c)a.isDependencyToolTipVisible=a.isTaskToolTipVisible;if(typeof a.predecessorItemTemplate===c)a.predecessorItemTemplate=Mb(a);if(typeof a.isDraggingTaskStartEndsEnabled===c)a.isDraggingTaskStartEndsEnabled=true;if(typeof a.areTaskDependencyConstraintsEnabledWhileDragging===c)a.areTaskDependencyConstraintsEnabledWhileDragging=false;if(typeof a.isTaskStartReadOnly===c)a.isTaskStartReadOnly=false;if(typeof a.isTaskEffortReadOnly===c)a.isTaskEffortReadOnly= +false;if(typeof a.isTaskCompletionReadOnly===c)a.isTaskCompletionReadOnly=false;if(typeof a.areTaskPredecessorsReadOnly===c)a.areTaskPredecessorsReadOnly=false;if(typeof a.isBaselineVisible===c)a.isBaselineVisible=true;if(typeof a.isSummaryTaskCompletedEffortVisible===c)a.isSummaryTaskCompletedEffortVisible=false;var w=null;if(a.isIndividualItemNonworkingTimeHighlighted||a.areTaskInterruptionsHighlighted)for(d=0;d=b.start?g:b.start,finish:m<=b.finish?m:b.finish});e=typeof e!==c&&typeof e.specialNonworkingDays!==c?e.specialNonworkingDays:a.specialNonworkingDays;if(typeof e!==c)for(var f=0;f=b.start&&m<=b.finish&&d.push({start:g,finish:m})}}if(d==null||d.length==0)return typeof t!== +c?t(b):null;g=b.ganttChartView.ownerDocument;m=g.createElementNS("http://www.w3.org/2000/svg","g");for(e=0;e=0&&p0?"auto":e.itemHeight+"px";else{var c=a.clientHeight-e.headerHeight-2;c<0&&(c=0);b=c+"px";if(c0?"auto":e.itemHeight+"px"}a.isContentHeightInitialized=true}return b},L=function(a,d){if(typeof d.toggleButtonAreaWidth!==c)return d.toggleButtonAreaWidth;var e=0;if(d.isGridVisible)for(var b=0;b0){e=16;break}return d.toggleButtonAreaWidth=e},Q=function(a, +d){var e=a.createElement("span");e.innerHTML=d;return e},V=function(a,d){return d==true?a.createTextNode("\u2713"):a.createTextNode("")},Z=function(a){var d=a.getFullYear(),e=a.getMonth()+1;e<10&&(e="0"+e);a=a.getDate();a<10&&(a="0"+a);return e+"/"+a+"/"+d},sa=function(a){var d=Z(a),e=a.getHours();e<10&&(e="0"+e.toString());a=a.getMinutes();a<10&&(a="0"+a.toString());return d+" "+e+":"+a},x=function(a){return new Date(a.valueOf()+a.getTimezoneOffset()*6E4)},o=function(a){var d=new Date;if(a==null|| +a=="")return d;var e,b,c,f;c=a.indexOf(" ");if(c>=0){e=a.substr(0,c);f=a.substr(c+1)}else{e=a;f="0"}c=e.indexOf("/");if(c>=0){for(a=e.substr(0,c);a.length>0&&a.substr(0,1)=="0";)a=a.substr(1);a=parseInt(a)-1;e=e.substr(c+1);c=e.indexOf("/");if(c>=0){b=e.substr(0,c);for(c=e.substr(c+1);c.length>0&&c.substr(0,1)=="0";)c=c.substr(1);e=parseInt(c)}else{b=e;e=d.getFullYear()}for(;b.length>0&&b.substr(0,1)=="0";)b=b.substr(1);b=parseInt(b)}else{for(;e.length>0&&e.substr(0,1)=="0";)e=e.substr(1);b=parseInt(e); +a=d.getMonth();e=d.getFullYear()}var h;c=f.indexOf(":");if(c>=0){h=f.substr(0,c);f=f.substr(c+1)}else{h=f;f="0"}for(;h.length>1&&h.substr(0,1)=="0";)h=h.substr(1);for(c=parseInt(h);f.length>1&&f.substr(0,1)=="0";)f=f.substr(1);f=parseInt(f);return isNaN(e)||isNaN(a)||isNaN(b)||e<=0||a<0||a>=12||b<1||b>aa[a]+(a!=1||!(e%400==0||(e%100==0?0:e%4==0))?0:1)?isNaN(c)||isNaN(f)||c<0||c>=24||f<0||f>=60?d:new Date(d.getFullYear(),d.getMonth(),d.getDate(),c,f,0,0):isNaN(c)||isNaN(f)||c<0||c>=24||f<0||f>=60? +new Date(e,a,b,0,0,0,0):new Date(e,a,b,c,f,0,0)},k=function(a){return new Date(a.valueOf()-a.getTimezoneOffset()*6E4)},s=function(a,d){var e=a.ownerDocument,b=e.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("style","width: 12px; height: 12px; vertical-align: initial");b.setAttribute("focusable","false");e=e.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("id","PART_Border");e.setAttribute("width","12");e.setAttribute("height","12");e.setAttribute("style","fill: White; fill-opacity: 0"); +b.appendChild(e);a.setAttribute("id","PART_Button");typeof d.toggleButtonClass!==c&&a.setAttribute("class",d.toggleButtonClass);typeof d.toggleButtonStyle!==c&&a.setAttribute("style",d.toggleButtonStyle);b.appendChild(a);return b},q=function(a,d){typeof d!=="object"&&(d={});K(d);var e=[{header:"",width:32,isSelection:true},{header:"Task",width:140,isTreeView:true},{header:"Start",width:140},{header:"Finish",width:140},{header:"Milestone",width:80},{header:"Completed",width:80},{header:"Assignments", +width:200}];e[0].cellTemplate=v(d,e[0],a);e[1].cellTemplate=A(d,e[1],a);e[1].exportCellTemplate=A(d,e[1],a,false);e[2].cellTemplate=Nb(d,e[2]);e[2].exportCellTemplate=Nb(d,e[2],false);e[3].cellTemplate=Ob(d,e[3]);e[3].exportCellTemplate=Ob(d,e[3],false);e[4].cellTemplate=G(d,e[4]);e[4].exportCellTemplate=G(d,e[4],false);e[5].cellTemplate=Pb(d,e[5]);e[5].exportCellTemplate=Pb(d,e[5],false);e[6].cellTemplate=Qb(d,e[6]);e[6].exportCellTemplate=Qb(d,e[6],false);d.selectionMode!="Single"&&(d.selectionMode!= +"Extended"&&d.selectionMode!="ExtendedFocus")&&e.splice(0,1);return e},v=function(a,d,e){return function(b){return!d.isReadOnly?C(b,a,e):V(b.ganttChartView.ownerDocument,b.isSelected)}},C=function(a,d){var e=a.ganttChartView.ownerDocument,b;if(typeof a.selectionInput===c){b=e.createElement("input");a.selectionInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px")}else b=a.selectionInput;if(a.isSelected){b.setAttribute("checked","checked");if(!b.checked)b.checked=true}else if(b.checked)b.checked= +false;var g=function(){b.checked?r(a,true,d.selectionMode):r(a,false,d.selectionMode)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);b.addEventListener("change",g,true);b.changeEventListener=g;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress",b.keyPressEventListener,true);b.addEventListener("keypress",e,true);b.keyPressEventListener=e;return b},r=function(a, +d,e){a.isSelected=d;y(a,"isSelected",true,true);Rb(a);if(typeof a.ganttChartView!==c){a.ganttChartView.selectedItem=a;if(e!="Extended"&&e!="ExtendedFocus")a.ganttChartView.selectedItems=[a];var b;if(e!="Extended"&&e!="ExtendedFocus")for(b=0;b +a.start,d,m;if(e.isTaskEffortPreservedWhenStartChangesInGrid){d=da(a,e);m=ya(a,e)}a.start=R(k(e.dateTimeParser(g.value)),e,true,a.isMilestone,D(a));a.preferredStart=a.start;if(a.isMilestone)a.finish=a.start;y(a,"start",true,true);if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}if(typeof a.completedInput!== +c){b=a.completedInput;typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);delete a.completedInput}if(e.isTaskEffortPreservedWhenStartChangesInGrid){Wa(a,d,e);Xa(a,m,e)}}Y(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",m,true);g.changeEventListener=m;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();m(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress", +g.keyPressEventListener,true);g.addEventListener("keypress",d,true);g.keyPressEventListener=d;return g},Ob=function(a,d,e){var b=function(b){return typeof b.finish===c||typeof b.isMilestone!==c&&b.isMilestone==true&&typeof b.start!==c&&b.finish.valueOf()==b.start.valueOf()||typeof b.isSummaryEnabled!==c&&!b.isSummaryEnabled&&typeof b.isBarVisible!==c&&!b.isBarVisible?b.ganttChartView.ownerDocument.createTextNode(""):b.ganttChartView.ownerDocument.createTextNode(a.dateTimeFormatter(x(b.finish)))}; +return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly)&&!(typeof e.isSummaryEnabled!==c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Dc(e,Math.max(0,d.width-16),a):b(e)}:b},Dc=function(a,d,e){var b=a.ganttChartView.ownerDocument,g;if(typeof a.finishInput===c){g=b.createElement("input");a.finishInput=g;try{g.type=e.dateTimePickerType}catch(f){g.type="text"}g.addEventListener("focus",function(){z(a,e)}, +false);g.addEventListener("focus",function(){g.style.backgroundColor="White"},false);g.addEventListener("blur",function(){g.style.backgroundColor="Transparent"},false)}else g=a.finishInput;if(typeof a.finish!==c)g.value=e.dateTimeFormatter(x(a.finish));DlhSoft.Controls.DatePicker&&(e.dateTimePickerType=="text"&&e.useDatePicker)&&g.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var d=(e.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(g); +if(!d||!d.isOpen){var c=0,m=0;try{c=g.selectionStart;m=g.selectionEnd}catch(f){}d=(e.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(g,void 0,{inputStyle:null,isDropDownButtonVisible:false,defaultTimeOfDay:e.workingDayFinish,dateTimeFormatter:e.dateTimeFormatter,dateTimeParser:e.dateTimeParser,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid "+e.border,disabledDateSelector:Sb(e),disabledTimeSelector:U(e, +a),calendarSelectorLevels:e.calendarSelectorLevels,months:e.months,daysOfWeek:Va(e.daysOfWeek)},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");d.openDropDown();setTimeout(function(){try{g.selectionStart=c;g.selectionEnd=m}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{g.focus()}catch(a){}},100):b.createEvent&&setTimeout(function(){var a=b.createEvent("MouseEvents"); +a.initEvent("blur",true,false);g.dispatchEvent(a)})}}},true);var h="";typeof a.isMilestone!==c&&a.isMilestone==true&&(h="; visibility: hidden");var m="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))m="; font-weight: bold";g.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+h+m);a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)?g.setAttribute("disabled","true"):g.removeAttribute("disabled");var j=function(){if(!a.hasChildren|| +!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var b=k(e.dateTimeParser(g.value));g.value.length>0&&(g.value.indexOf(" ")<0&&ja(b)==0)&&(b=$(b));a.finish=R(b,e,a.isMilestone,true,D(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}if(typeof a.completedInput!==c){b=a.completedInput;typeof b.changeEventListener!== +c&&b.removeEventListener("change",b.changeEventListener,true);delete a.completedInput}}Y(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",j,true);g.changeEventListener=j;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();j(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress",g.keyPressEventListener,true);g.addEventListener("keypress",d,true);g.keyPressEventListener=d;return g},Sb=function(a){return function(d){if(d.getDay()< +a.workingWeekStart||d.getDay()>a.workingWeekFinish)return true;d=k(d).valueOf();if(a.specialNonworkingDays)for(var e=0;e=a.visibleDayFinish}},U=function(a,d){return function(e){return(X(d.start)a.visibleDayFinish}},Va=function(a){if(a){for(var d=[],e=0;e0?b[0].toUpperCase()+(b.length>1?b[1]:""):"";d.push(b)}return d}},G=function(a,d,e){var b=function(a){return typeof a.isMilestone===c||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):V(a.ganttChartView.ownerDocument,a.isMilestone)};return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly)&&!(typeof e.isSummaryEnabled!== +c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Ec(e,a):b(e)}:b},Ec=function(a,d){var e=a.ganttChartView.ownerDocument,b;if(typeof a.milestoneInput===c){b=e.createElement("input");a.milestoneInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px; margin-left: 2px; margin-right: 2px");b.addEventListener("focus",function(){z(a,d)},false)}else b=a.milestoneInput;(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))&&typeof a.isMilestone!==c&&a.isMilestone? +b.setAttribute("checked",true):b.removeAttribute("checked");if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var g=function(){if(b.checked){a.isMilestone=true;y(a,"isMilestone",true,true);if(a.finish>a.start){a.finish=a.start;y(a,"finish",false,true)}if(a.completedFinish>a.start){a.completedFinish=a.start;y(a,"completedFinish",false,true)}}else{a.isMilestone=false;y(a,"isMilestone",true,true)}Y(a)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener, +true);b.addEventListener("change",g,true);b.changeEventListener=g;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress",b.keyPressEventListener,true);b.addEventListener("keypress",e,true);b.keyPressEventListener=e}else b.setAttribute("style","visibility: hidden");return b},Qb=function(a,d,e){var b=function(a){return typeof a.assignmentsContent===c||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!== +c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):Q(a.ganttChartView.ownerDocument,a.assignmentsContent)};return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly&&!a.isAssignmentsContentReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly)&&!(typeof e.isSummaryEnabled!==c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Fc(e,Math.max(0,d.width-16),a):b(e)}:b},Fc=function(a,d,e){var b=a.ganttChartView,g=b.ownerDocument,f;if(typeof a.assignmentsContentInput=== +c){f=g.createElement("input");a.assignmentsContentInput=f;f.type="text";f.addEventListener("focus",function(){z(a,e)},false);var h=function(){a.assignmentsContent=f.value;y(a,"assignmentsContent",true,true);if(!a.hasChildren&&a.hasFixedEffort){a.fixedEffort=da(a,e);a.fixedEffortAssignments=fa(a)}na(a);var b=null;DlhSoft.Controls.MultiSelectorComboBox&&(b=DlhSoft.Controls.MultiSelectorComboBox.get(f));if(b!=null&&b.availableChoices.length>0)var d=setInterval(function(){if(!b.isOpen&&g.activeElement!= +a.assignmentsContentInput){clearInterval(d);Y(a)}},100);else Y(a)};typeof f.changeEventListener!==c&&f.removeEventListener("change",f.changeEventListener,true);f.addEventListener("change",function(a){f.dontAutoFocus=true;h(a)},true);f.changeEventListener=h;var m=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();typeof f.dontAutoFocus!==c&&delete f.dontAutoFocus;h(a)}};typeof f.keyPressEventListener!==c&&f.removeEventListener("keypress",f.keyPressEventListener,true);f.addEventListener("keypress", +m,true);f.keyPressEventListener=m;f.addEventListener("focus",function(){f.style.backgroundColor="White"},false);f.addEventListener("blur",function(){f.style.backgroundColor="Transparent"},false)}else f=a.assignmentsContentInput;if(typeof a.assignmentsContent!==c)f.value=a.assignmentsContent;DlhSoft.Controls.MultiSelectorComboBox&&e.useResourceSelector&&f.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var d=DlhSoft.Controls.MultiSelectorComboBox.get(f);if(!d||!d.isOpen&&d.availableChoices.length> +0){d=e.assignableResources;if(typeof d===c){d=Ia(b.items);e.assignableResources=d}var m=0,n=0;try{m=f.selectionStart;n=f.selectionEnd}catch(h){}d=DlhSoft.Controls.MultiSelectorComboBox.initialize(f,d,void 0,{inputStyle:null,autoAppendAvailableChoices:e.autoAppendAssignableResources,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; color: Black; border: 1px solid "+e.border+"; font-size: small; max-height: 188px; overflow-y: auto"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."); +d.openDropDown();setTimeout(function(){try{f.selectionStart=m;f.selectionEnd=n}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{f.focus()}catch(a){}},100):g.createEvent&&setTimeout(function(){var a=g.createEvent("MouseEvents");a.initEvent("blur",true,false);f.dispatchEvent(a)})}}},true);m="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))m="; font-weight: bold";f.setAttribute("style","background-color: Transparent; width: "+ +d+"px; border-width: 0px; padding: 0px"+m);return f},Pb=function(a,d,e){var b=function(a){return typeof a.start===c||typeof a.finish===c||a.finish.valueOf()==a.start.valueOf()||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):V(a.ganttChartView.ownerDocument,a.ganttChartView.isItemCompleted(a))};return(typeof e===c||e)&&!a.isReadOnly&&!a.isGridReadOnly?function(e){return!d.isReadOnly&&(typeof e.isReadOnly=== +c||!e.isReadOnly)&&(!e.hasChildren||!(typeof e.isSummaryEnabled===c||e.isSummaryEnabled))&&!(typeof e.isSummaryEnabled!==c&&!e.isSummaryEnabled&&typeof e.isBarVisible!==c&&!e.isBarVisible)?Gc(e,a):b(e)}:b},Gc=function(a,d){var e=a.ganttChartView.ownerDocument,b;if(typeof a.completedInput===c){b=e.createElement("input");a.completedInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px; margin-left: 2px; margin-right: 2px");b.addEventListener("focus",function(){z(a,d)},false)}else b=a.completedInput; +a.isSetAsCompleted||(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))&&a.completedFinish>=a.finish&&a.finish>a.start&&(typeof a.isMilestone===c||!a.isMilestone)?b.setAttribute("checked",true):b.removeAttribute("checked");a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)&&b.setAttribute("style","visibility: hidden");var g=function(){if(b.checked){if(a.completedFinisha.start){a.completedFinish=a.start;y(a,"completedFinish",true,true)}if(a.isMilestone||a.finish.valueOf()<=a.start.valueOf())a.isSetAsCompleted=false}Y(a)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);b.addEventListener("change",g,true);b.changeEventListener=g;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress", +b.keyPressEventListener,true);b.addEventListener("keypress",e,true);b.keyPressEventListener=e;return b},gb=function(a){for(var d=0,e=0;e=4?2:d.width/2;g.setAttribute("style","padding-left: "+f+"px; padding-right: "+f+"px; overflow-x: hidden; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+d.width+"px");f=a.createElement("div");typeof d.headerClass!==c&&f.setAttribute("class",d.headerClass);typeof d.headerStyle!==c&&f.setAttribute("style",d.headerStyle);f.appendChild(Q(a,d.header));g.appendChild(f);b.appendChild(g);if(d.width>= +1&&(typeof e.allowUserToResizeColumns===c||e.allowUserToResizeColumns)&&(typeof d.allowUserToResize===c||d.allowUserToResize)){b.isGripperVisible=false;var h=d.ganttChartView,m=function(a){b.isGripperVisible=a;b.style.cursor=a?"e-resize":"default";b.style.borderRight=a?"solid 1px "+e.border:e.verticalGridLines?"solid 1px "+e.verticalGridLines:"";g.style.width=d.width-(b.style.borderRight?1:0)+"px"};e.verticalGridLines&&m();var j=e.splitterWidth;b.addEventListener("mouseover",function(a){if(!DlhSoft.Controls.GanttChartView.isGripperDragging&& +!(b.isGripperDragging||typeof a.offsetX===c&&a.currentTarget!=b))m((typeof a.offsetX!==c?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=d.width-j)},true);b.addEventListener("mousemove",function(a){if(!DlhSoft.Controls.GanttChartView.isGripperDragging&&!(b.isGripperDragging||typeof a.offsetX===c&&a.currentTarget!=b))m((typeof a.offsetX!==c?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=d.width-j)},true);g.addEventListener("mouseover",function(a){!DlhSoft.Controls.GanttChartView.isGripperDragging&& +(!b.isGripperDragging&&!(typeof a.offsetX!==c||a.currentTarget!=g))&&m(a.layerX-a.currentTarget.offsetLeft>=d.width-j)},false);g.addEventListener("mousemove",function(a){!DlhSoft.Controls.GanttChartView.isGripperDragging&&(!b.isGripperDragging&&!(typeof a.offsetX!==c||a.currentTarget!=g))&&m(a.layerX-a.currentTarget.offsetLeft>=d.width-j)},false);b.addEventListener("mousedown",function(a){if(!(a.button!=0||!b.isGripperVisible||DlhSoft.Controls.GanttChartView.isGripperDragging)){DlhSoft.Controls.GanttChartView.isGripperDragging= +true;b.isGripperDragging=true;b.initialGripperDraggingX=a.clientX;b.initialColumnWidth=d.width}},true);a.addEventListener("mousemove",function(a){if(b.isGripperDragging){d.width=Math.max(d.minWidth,b.initialColumnWidth+(a.clientX-b.initialGripperDraggingX));if(typeof d.maxWidth!==c&&d.width>d.maxWidth)d.width=d.maxWidth;g.style.width=d.width-1+"px";typeof e.columnWidthChangeHandler!==c&&setTimeout(function(){e.columnWidthChangeHandler(d,d.width)},0);if(!h.isWaitingToRefreshColumns){h.isWaitingToRefreshColumns= +true;setTimeout(function(){var a=gb(e.columns);h.gridHeader.style.width=a+"px";h.gridContent.style.width=a+"px";delete h.isWaitingToRefreshColumns;h.refreshGridItems()},0)}}},true);a.addEventListener("mouseup",function(){if(b.isGripperDragging){delete b.isGripperDragging;delete b.initialGripperDraggingX;delete b.initialColumnWidth;m(false);delete DlhSoft.Controls.GanttChartView.isGripperDragging}},true);b.addEventListener("mouseout",function(){b.isGripperDragging||m(false)},false)}return b},ca=function(a, +d){for(var e=-1,b=null,g=null,f=[],h=0;hj){m.indentation=j;y(m,"indentation",false,true)}b.hasChildren=m.indentation>b.indentation;if(b.hasChildren&& +typeof b.isMilestone!==c&&b.isMilestone){b.isMilestone=false;y(b,"isMilestone",false,true)}}}m.isVisible=e<0||m.indentation<=e;if(typeof m.scheduleChartItem===c){if(m.isVisible&&!m.isExpanded)e=m.indentation;m.isExpanded&&m.indentation==e&&(e=-1);b=m}}if(b!=null)b.hasChildren=false;d.selectedItem=g;d.selectedItems=f},Ha=function(a,d,e){e.isTimingInformationInitialized=false;e.isBasicTimingInformationInitialized=false;var b=X(d.currentTime),g=[],f,h,m;for(h=0;h0&&(j=g[g.length-1]);j!=null&&f.indentation<=j.indentation;){g.pop();j=g[g.length-1]}f.parent=j;f.children=[];j!=null&&j.children.push(f);if(!f.hasChildren||!(typeof f.isSummaryEnabled===c||f.isSummaryEnabled)){m=f.start;var l=f.finish,n=f.completedFinish;if(typeof f.start===c){f.start=b;f.preferredStart=f.start}if(typeof f.finish===c)f.finish=typeof f.isMilestone===c||!f.isMilestone?$(b):f.start;if(typeof f.isSetAsCompleted===c)f.isSetAsCompleted=typeof f.completedFinish!==c&&f.completedFinish.valueOf()== +f.finish.valueOf();if(typeof f.completedFinish===c)f.completedFinish=f.start;if(typeof f.isRelativeToTimezone===c||f.isRelativeToTimezone){f.start=new Date(f.start.valueOf()-f.start.getTimezoneOffset()*6E4);f.ftart=f.start;f.finish=new Date(f.finish.valueOf()-f.finish.getTimezoneOffset()*6E4);f.completedFinish=typeof f.completedFinish==="number"?S(f.start,f.completedFinish*O(f.start,f.finish,d,D(f)),d,D(f)):new Date(f.completedFinish.valueOf()-f.completedFinish.getTimezoneOffset()*6E4);if(typeof f.baselineStart!== +c)f.baselineStart=new Date(f.baselineStart.valueOf()-f.baselineStart.getTimezoneOffset()*6E4);if(typeof f.baselineFinish!==c)f.baselineFinish=new Date(f.baselineFinish.valueOf()-f.baselineFinish.getTimezoneOffset()*6E4);if(typeof f.minStart!==c)f.minStart=new Date(f.minStart.valueOf()-f.minStart.getTimezoneOffset()*6E4);if(typeof f.maxStart!==c)f.maxStart=new Date(f.maxStart.valueOf()-f.maxStart.getTimezoneOffset()*6E4);if(typeof f.minFinish!==c)f.minFinish=new Date(f.minFinish.valueOf()-f.minFinish.getTimezoneOffset()* +6E4);if(typeof f.maxFinish!==c)f.maxFinish=new Date(f.maxFinish.valueOf()-f.maxFinish.getTimezoneOffset()*6E4);f.isRelativeToTimezone=false}else if(typeof f.completedFinish==="number")f.completedFinish=S(f.start,f.completedFinish*O(f.start,f.finish,d,D(f)),d,D(f));if(typeof f.minStart!==c&&f.startf.maxStart)f.start=f.maxStart;if(typeof f.maxFinish!==c&&f.finish>f.maxFinish)f.finish=f.maxFinish;else if(typeof f.minFinish!==c&&f.finish< +f.minFinish)f.finish=f.minFinish;if(f.finishf.finish)f.completedFinish=f.finish;if(typeof f.loadChartItem===c)f.start=R(f.start,d,true,typeof f.isMilestone!==c&&f.isMilestone,D(f));typeof f.dependsOf!==c&&delete f.dependsOf;f.preferredStart=f.start;if(typeof f.loadChartItem===c){f.finish=R(f.finish,d,typeof f.isMilestone!==c&&f.isMilestone,true,D(f));f.completedFinish=R(f.completedFinish,d,typeof f.isMilestone!== +c&&f.isMilestone,true,D(f))}if(f.finishf.finish)f.completedFinish=f.finish;if(typeof f.isSetAsCompleted!==c&&(!f.isMilestone||f.completedFinish.valueOf()f.start){l.start=f.start;y(l,"start",false,true)}if(typeof l.finish===c||l.finishj.indentation)&&g.push(f)}e.isBasicTimingInformationInitialized=true;for(h=a.length;h-- >0;){f=a[h];f.hasChildren&&(typeof f.isSummaryEnabled===c||f.isSummaryEnabled)&&Ya(f)}if(d.areTaskDependencyConstraintsEnabled)for(h=0;h0)&&Ka(f,a,d,e)}for(h=0;hm.start)a.start=m.start;if(typeof a.finish=== +c||a.finishd.visibleWeekFinish?c+(d.visibleWeekFinish-d.visibleWeekStart+1)*e:c+(b-d.visibleWeekStart)*e,e=ja(a);b>=d.visibleWeekStart&& +b<=d.visibleWeekFinish&&(c=e<=d.visibleDayStart?c+0:e>=d.visibleDayFinish?c+(d.visibleDayFinish-d.visibleDayStart)/36E5*d.hourWidth:c+(e-d.visibleDayStart)/36E5*d.hourWidth);return c},Ca=function(a,d){for(var e=d.timelineStart.valueOf(),b=Za(d),c=Za(d)*(d.visibleWeekFinish-d.visibleWeekStart+1);a>c;){e=e+6048E5;a=a-c}for(e=e+Math.max(0,d.visibleWeekStart-d.weekStartDay)*864E5;a>b;){e=e+864E5;a=a-b}e=e+d.visibleDayStart;e=e+a/d.hourWidth*36E5;return new Date(e)},Eb=function(a){switch(a.theme){default:return[{scaleType:"NonworkingTime", +isHeaderVisible:false,isHighlightingVisible:true,highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px"},{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: #8bbf8a; stroke-width: 0.5px"}];case "ModernBordered":return[{scaleType:"NonworkingTime",isHeaderVisible:false,isHighlightingVisible:true, +highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px; border-right: solid 1px White; border-bottom: solid 1px White",isSeparatorVisible:true,separatorStyle:"stroke: #c8bfe7; stroke-width: 0.5px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px; border-right: solid 1px White"},{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: #8bbf8a; stroke-width: 1px"}]; +case "Aero":return[{scaleType:"NonworkingTime",isHeaderVisible:false,isHighlightingVisible:true,highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px; border-right: solid 1px #c8bfe7; border-bottom: solid 1px #c8bfe7",isSeparatorVisible:true,separatorStyle:"stroke: #c8bfe7; stroke-width: 0.5px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px; border-right: solid 1px #c8bfe7"}, +{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: Black; stroke-width: 1px"}]}},oa=function(a,d){return new Date(Math.floor((a-2592E5).valueOf()/d.updateScale)*d.updateScale+2592E5)},hb=function(a,d,e,b,g){typeof g===c&&(g=false);var f=a.ownerDocument,h=0,m,j;for(m=0;m0&&(l=b.headerHeight/h);for(m=0;mw&&(typeof j.isHeaderVisible===c||j.isHeaderVisible))J=w;Jb.timelineFinish)p=b.timelineFinish;p0?864E5:0));g=Jc(b),b0?864E5: +0));g=Kc(b),bd){a=$(a);return new Date(X(a).valueOf()+ +e)}return new Date(a.valueOf())},$=function(a){return new Date(a.valueOf()+864E5)},La=function(a){return new Date(a.valueOf()-864E5)},xa=function(a){return new Date(a.valueOf()+6048E5)},Kc=function(a){var d=a.getTimezoneOffset(),a=new Date(a.valueOf()+(d>0?864E5:0)),e=a.getMonth()+1;if(e>=12){e=0;a.setFullYear(a.getFullYear()+1)}a.setMonth(e,1);e=a.getTimezoneOffset();return new Date(a.valueOf()-(e-d)*6E4-(e>0?864E5:0))},Jc=function(a){var d=a.getTimezoneOffset(),a=new Date(a.valueOf()+(d>0?864E5: +0));a.setFullYear(a.getFullYear()+1);a.setMonth(0,1);var e=a.getTimezoneOffset();return new Date(a.valueOf()-(e-d)*6E4-(e>0?864E5:0))},Tb=function(a,d){if(typeof d===c)return false;for(var e=a.valueOf(),b=0;b0?d[0].toUpperCase():"";case "Day":a=new Date(a.valueOf()+a.getTimezoneOffset()*6E4);return(a.getDate()< +10?"0":"")+a.getDate();case "Month":return e.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()];case "MonthAbbreviation":d=e.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()];return d.length<=0?"":d[0].toUpperCase()+(d.length>1?d.substr(1,Math.min(3,d.length)-1):"");case "Year":return(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getFullYear();case "MonthYear":return e.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()]+ +" "+(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getFullYear();default:return d.headerText?d.headerText:a.toString()}},Ac=function(a,d,e,b,g,f,h){for(var m=0,j=0;jg){e=e+d.itemHeight;g=b++}else{e=Math.max(e,h.itemTop+d.itemHeight);g=h.displayRowIndex}}return e},za=function(a,d,e){if(a.isPart)return za(a.ganttChartItem,d,e);var b;if(typeof a.displayRowIndex!==c){b=a.displayRowIndex*e.itemHeight;return a.itemTop=b}for(var g=b=0;gb.count){m=document.createElementNS("http://www.w3.org/2000/svg","rect");m.setAttribute("x",0);m.setAttribute("y",f*e.itemHeight);m.setAttribute("width",d.clientWidth); +m.setAttribute("height",e.itemHeight);typeof e.alternativeChartItemClass!==c&&m.setAttribute("class",e.alternativeChartItemClass);typeof e.alternativeChartItemStyle!==c&&m.setAttribute("style",e.alternativeChartItemStyle);m.index=f;b.appendChild(m)}}b.count=f}else{j.setAttribute("class","");j.setAttribute("style","")}f++}}for(g=b.childNodes.length;g-- >0;){a=b.childNodes[g];a.index>b.count&&b.removeChild(a)}}},Ub=function(a,d,e,b,g,f){var h=a.ganttChartView.ownerDocument,m=h.createElement("div"); +typeof f.itemClass!==c&&m.setAttribute("class",f.itemClass);typeof f.itemStyle!==c&&m.setAttribute("style",f.itemStyle);var j=h.createElement("div");a.alternativeContentContainer=j;var l=h.createElement("div");try{l.addEventListener("mousedown",function(b){b.target!=a.selectionInput&&z(a,f)},false);l.addEventListener("mouseup",function(b){b.target!=a.selectionInput&&z(a,f)},false)}catch(n){}if(a.isSelected){typeof f.selectedItemClass!==c&&l.setAttribute("class",f.selectedItemClass);typeof f.selectedItemStyle!== +c&&l.setAttribute("style",f.selectedItemStyle)}var w=h.createElement("div");typeof a["class"]!==c&&w.setAttribute("class",a["class"]);typeof a.style!==c&&w.setAttribute("style",a.style);var u=h.createElement("div");if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){typeof f.summaryItemClass!==c&&u.setAttribute("class",f.summaryItemClass);typeof f.summaryItemStyle!==c&&u.setAttribute("style",f.summaryItemStyle)}else if(a.isMilestone){typeof f.milestoneItemClass!==c&&u.setAttribute("class", +f.milestoneItemClass);typeof f.milestoneItemStyle!==c&&u.setAttribute("style",f.milestoneItemStyle)}else{typeof f.standardItemClass!==c&&u.setAttribute("class",f.standardItemClass);typeof f.standardItemStyle!==c&&u.setAttribute("style",f.standardItemStyle)}h=h.createElement("div");a.gridItem=h;a.gridItemContent=u;a.gridItemSelectionContainer=l;var t=f.itemHeight;if(!a.isVisible||typeof a.isHidden!==c&&a.isHidden)t=0;h.setAttribute("style","overflow: hidden; height: "+t+"px");Aa(h,a,d,e,b,g,f);u.appendChild(h); +w.appendChild(u);l.appendChild(w);j.appendChild(l);m.appendChild(j);a.gridItemContainer=m;(typeof f.isGridRowClickTimeScrollingEnabled===c||f.isGridRowClickTimeScrollingEnabled)&&m.addEventListener("mouseup",function(){var d;if(typeof a.ganttChartItems===c)d=a.start;else{d=null;for(var e=0;e=b.container.clientWidth/2.5&&(e=d);b.container.scrollLeft= +Math.max(0,e)},true);return m},Aa=function(a,d,e,b,g,f,h){var m=d.ganttChartView.ownerDocument;if(!h.isVirtualizing||typeof d.isVirtuallyVisible!==c&&d.isVirtuallyVisible){var j=function(){if(typeof d.gridItemSelectionContainer!==c){var j=d.gridItemSelectionContainer;typeof h.selectedItemClass!==c&&j.setAttribute("class",d.isSelected?h.selectedItemClass:null);typeof h.selectedItemStyle!==c&&j.setAttribute("style",d.isSelected?h.selectedItemStyle:null)}if(typeof d.gridItemContent!==c){j=d.gridItemContent; +j.setAttribute("class","");j.setAttribute("style","");if(d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)){typeof h.summaryItemClass!==c&&j.setAttribute("class",h.summaryItemClass);typeof h.summaryItemStyle!==c&&j.setAttribute("style",h.summaryItemStyle)}else if(d.isMilestone){typeof h.milestoneItemClass!==c&&j.setAttribute("class",h.milestoneItemClass);typeof h.milestoneItemStyle!==c&&j.setAttribute("style",h.milestoneItemStyle)}else{typeof h.standardItemClass!==c&&j.setAttribute("class", +h.standardItemClass);typeof h.standardItemStyle!==c&&j.setAttribute("style",h.standardItemStyle)}}var j=[],n=null;try{n=m.activeElement}catch(w){}for(;n!=null&&n!=d.gridItem;){j.push(n);n=n.parentNode}for(var u=-1,n=a.childNodes.length;n-- >0;)if(j.indexOf(a.childNodes[n])>=0){u=n;break}for(n=a.childNodes.length;n-- >0;)a.removeChild(a.childNodes[n]);for(n=0;n=0&&setTimeout(function(){try{for(var b=a.childNodes[u];b.nodeName!= +"input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(d){}},0)};if(d.wasGridItemContentLoaded)setTimeout(j,0);else{j();d.wasGridItemContentLoaded=true}}},Na=function(a){if(typeof a.isWaitingToRefreshGridItem===c){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!==c&&Aa(a.gridItem,a,a.ganttChartView.items, +a.ganttChartView.settings.columns,a.ganttChartView.chartContent,a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings);delete a.isWaitingToRefreshGridItem},0)}},Mc=function(a,d,e,b,g,f,h){var m=d.ganttChartView.ownerDocument;(!h.isVirtualizing||typeof d.isVirtuallyVisible!==c&&d.isVirtuallyVisible)&&setTimeout(function(){if(typeof d.gridItemSelectionContainer!==c){var j=d.gridItemSelectionContainer;typeof h.selectedItemClass!==c&&j.setAttribute("class",d.isSelected?h.selectedItemClass: +null);typeof h.selectedItemStyle!==c&&j.setAttribute("style",d.isSelected?h.selectedItemStyle:null)}var j=[],l=null;try{l=m.activeElement}catch(n){}for(;l!=null&&l!=d.gridItem;){j.push(l);l=l.parentNode}for(var w=-1,l=a.childNodes.length;l-- >0;)if(a.childNodes[l].isSelection&&j.indexOf(a.childNodes[l])>=0){w=l;break}for(l=a.childNodes.length;l-- >0;)a.childNodes[l].isSelection&&a.removeChild(a.childNodes[l]);for(l=0;l=0&&setTimeout(function(){try{for(var b=a.childNodes[w];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(d){}},0)},0)},Rb=function(a){typeof a.gridItem!==c&&Mc(a.gridItem,a,a.ganttChartView.items,a.ganttChartView.settings.columns,a.ganttChartView.chartContent, +a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings)},Vb=function(a,d,e,b,g,f){var h=a.ganttChartView.ownerDocument,m=h.createElement("div"),j=0;e.isTreeView==true&&(j=f.indentationLevelWidth*a.indentation);m.setAttribute("style","overflow: hidden; vertical-align: middle; display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin: 0px; padding: 0px; width: "+e.width+"px; height: "+f.itemHeight+"px; padding-left: "+j+"px"); +var l=h.createElement("div");typeof e.cellClass!==c?l.setAttribute("class",e.cellClass):typeof f.cellClass!==c&&l.setAttribute("class",f.cellClass);typeof e.cellStyle!==c?l.setAttribute("style",e.cellStyle):typeof f.cellStyle!==c&&l.setAttribute("style",f.cellStyle);var n=h.createElement("div");n.setAttribute("style","white-space: nowrap; overflow: hidden; margin: 0px; padding: 0px; width: "+(e.width-j-16)+"px");if(e.isTreeView==true){j=h.createElement("div");j.setAttribute("style","display: inline-block; width: "+ +g+"px");if(a.hasChildren){g=h.createElement("div");g.setAttribute("style","cursor: default; padding-left: 1px; font-size: 12px; display: inline-block");h=f.collapsedToggleButtonTemplate;if(a.isExpanded)h=f.expandedToggleButtonTemplate;h=h();g.appendChild(h);Wb(g,a,d,h,b,null,null,f);j.appendChild(g)}n.appendChild(j)}a=e.cellTemplate(a);n.appendChild(a);l.appendChild(n);m.appendChild(l);m.isSelection=e.isSelection;return m},Cb=function(a,d){return function(){var e=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg", +"polygon");e.setAttribute("points","3.5,2.5 3.5,11.5 10.5,6.5");return s(e,d)}},Db=function(a,d){return function(){var e=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");e.setAttribute("points","2.5,3.5 11.5,3.5 6.5,10.5");return s(e,d)}},Wb=function(a,d,e,b,g,f,h,m){if(typeof f===c||f==null)f=b.querySelector("#PART_Button");f!=null&&Xb(f,f,m);if(typeof h===c||h==null)h=b.querySelector("#PART_Border");h!=null&&Xb(h,f,m);e={toggleButton:a,item:d,items:e,content:b,chartContent:g, +settings:m};if(f!=null){f.tag=e;(typeof m.isExport===c||!m.isExport)&&f.addEventListener("mouseup",ob,true)}if(h!=null){h.tag=e;(typeof m.isExport===c||!m.isExport)&&h.addEventListener("mouseup",ob,true)}a.tag=e;f==null&&(h==null&&(typeof m.isExport===c||!m.isExport))&&a.addEventListener("mouseup",ob,true);b.addEventListener("keypress",function(a){if(a.keyCode==32){a.preventDefault();a.stopPropagation();ga(d,!d.isExpanded,true)}},true);d.toggleButton=a},Xb=function(a,d,e){if(!(typeof e.isExport!== +c&&e.isExport)){a.addEventListener("mouseover",function(){typeof e.toggleButtonHoveringClass!==c&&d.setAttribute("class",e.toggleButtonHoveringClass);typeof e.toggleButtonHoveringStyle!==c&&d.setAttribute("style",e.toggleButtonHoveringStyle)},true);a.addEventListener("mouseout",function(){d.setAttribute("class",e.toggleButtonClass);d.setAttribute("style",e.toggleButtonStyle)},true)}},ob=function(a){a.stopPropagation();a=a.target.tag.item;ga(a,!a.isExpanded,true)},ga=function(a,d,e,b){if(a.isExpanded!= +d){a.isExpanded=d;(typeof b===c||b)&&y(a,"isExpanded",e,true);Yb(a)}},Yb=function(a,d){if(typeof a.toggleButton===c)(typeof d===c||d)&&setTimeout(function(){Yb(a,false)},0);else{var e=a.toggleButton,b=e.tag,g=b.settings,f=g.expandedToggleButtonTemplate,h=g.collapsedToggleButtonTemplate;a.isExpanded&&(h=f);var f=h(),h=f.querySelector("#PART_Button"),m=f.querySelector("#PART_Border");e.replaceChild(f,b.content);b.content=f;var j=b.items,b=b.chartContent;Wb(e,a,j,f,b,h,m,g);a.isVisible&&!(typeof a.isHidden!== +c&&a.isHidden)&&Nc(j,a,b,g);na(a);Ma(j,b,g);e=a.scheduleChartView;if(typeof e!==c)for(g=a.scheduleChartIndex;g0&&u.indexOf(w)<0){u.push(w);for(t=0;t0)for(f=0;f0){b=true;for(h=0;h0;)a.removeChild(a.childNodes[b]);if(!(e.isVirtualizing&&(typeof d.isVirtuallyVisible===c||!d.isVirtuallyVisible)||typeof d.isBarVisible!==c&&!d.isBarVisible)){b=e.standardTaskTemplate;if(typeof d.standardTaskTemplate!==c)b=d.standardTaskTemplate;if(d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)){b=e.summaryTaskTemplate;if(typeof d.summaryTaskTemplate!==c)b=d.summaryTaskTemplate}else if(d.isMilestone){b= +e.milestoneTaskTemplate;if(typeof d.milestoneTaskTemplate!==c)b=d.milestoneTaskTemplate}if(typeof d.taskTemplate!==c)b=d.taskTemplate;if(typeof e.internalPreTaskTemplate!==c){var g=e.internalPreTaskTemplate(d);g!=null&&a.appendChild(g)}b=b(d);b.addEventListener("contextmenu",function(a){typeof e.itemContextMenuHandler!==c?e.itemContextMenuHandler(a,d):a.preventDefault()},false);a.appendChild(b);if(typeof e.internalExtraTaskTemplate!==c){g=e.internalExtraTaskTemplate(d);g!=null&&a.appendChild(g)}if(typeof e.extraTaskTemplate!== +c){g=e.extraTaskTemplate(d);g!=null&&a.appendChild(g)}if(e.areTaskAssignmentsVisible){g=e.assignmentsTemplate(d);b.appendChild(g)}if(e.isTaskToolTipVisible){g=e.itemTemplate;if(typeof d.template!==c)g=d.template;b.appendChild(g(d))}if(e.areTaskDependenciesVisible&&typeof d.predecessors!==c)for(b=0;b=0&&Y(d[e]);Y(a);e=a.index+1;e0&&b[a-1].isPart;)a--;for(var f=0;f=0){d.isPart=true;d.ganttChartItem=b[f];break}var h=a0?b[a-1]:null;h=h!=null?h.indentation+1:0;if(d.indentation>h)d.indentation=h}else if(typeof d.indentation===c||d.indentationh.indentation)d.indentation= +h.indentation;M([d],g);b.splice(a,0,d);ca(b,e);if(typeof d.parts!==c){if(typeof d.isGroup===c){d.isGroup=true;d.isSummaryEnabled=false}M(d.parts,g);if(d.isGroup||typeof d.isBarVisible===c)d.isBarVisible=false;for(f=0;f= +0||b.splice(b.length,0,m)}}Ha(b,g,e);var j;if(g.isGridVisible&&!d.isPart&&typeof d.displayRowIndex===c){f=null;if(a0){for(f=e[g-1];f.parent!=null;)f=f.parent;h=f.isExpanded;a.hasChildren&&ga(f,a.isExpanded,false,true);f.indentation>=a.indentation&&(f=null)}else e[0].isExpanded||ga(e[0],true,false,true);var m=g+1a.indentation)&&ga(m,true,false,true);var j=m!=null?m.indentation:null,l,n,w;for(n=0;n0;)if(l.predecessors[w].item==a){l.predecessors.splice(w,1);y(l,"predecessors",false,true);ma(l);qa(l)}}var u=a.itemTop;e.splice(g,1);ca(e,d);Ha(e,b,d);b.isGridVisible&&typeof a.displayRowIndex===c&&typeof a.gridItemContainer!==c&&d.gridContent.removeChild(a.gridItemContainer);n=d.chartContent.chartArea; +typeof a.chartItem!==c&&n.removeChild(a.chartItem);m=g=e.length&&(g=e.length-1);if(g>=0){for(n=0;n0){g.appendChild(b.createTextNode("\n")); +for(var e="",f=0;f0&&(e=e+", ");e=e+h.item.content;h.dependencyType&&(e=e+(" ("+ac(h.dependencyType)+")"))}}g.appendChild(b.createTextNode("Predecessors: "+e))}}else if(!isNaN(d.units)){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Allocation: "+Math.round(d.units*1E4)/100+"%"))}return g}},Kb=function(a){return function(d){var e=d.ganttChartView,b=typeof a!==c?a:e.settings,e=e.ownerDocument,g=e.createElementNS("http://www.w3.org/2000/svg", +"text"),f=H(d.finish,b);if(d.isMilestone||d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled))f=f+b.barHeight/2;g.setAttribute("x",f+7);g.setAttribute("y",b.barMargin+b.barHeight-1);d=b.target!="Phone"?d.assignmentsContent:d.content;typeof d===c&&(d="");g.appendChild(e.createTextNode(d));typeof b.assignmentsClass!==c?g.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!==c&&g.setAttribute("style",b.assignmentsStyle);return g}},pb=function(a){var d=a.ganttChartView.ownerDocument; +if(typeof a.chartItemArea===c)a.chartItemArea=d.createElementNS("http://www.w3.org/2000/svg","g");for(d=a.chartItemArea.childNodes.length;d-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[d]);return a.chartItemArea},Gb=function(a,d,e){return function(b){var g=typeof d!==c?d:b.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,j=pb(b);if(f.isBaselineVisible&&typeof b.baselineStart!==c&&typeof b.baselineFinish!==c){var l=H(b.baselineStart,f),n=Math.max(H(b.baselineFinish, +f),l+4),w=m.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",l);w.setAttribute("y",f.barMargin/2);w.setAttribute("width",Math.max(0,n-l-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",f.barCornerRadius);l=f.baselineBarClass;if(typeof b.baselineBarClass!==c)l=b.baselineBarClass;if(typeof l!==c)w.setAttribute("class",l);else{l=f.baselineBarStyle;if(typeof b.baselineBarStyle!==c)l=b.baselineBarStyle;typeof l!==c&&w.setAttribute("style", +l)}j.appendChild(w)}var w=H(b.start,f),l=Math.max(H(b.finish,f),w+4),n=H(b.completedFinish,f),u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",w);u.setAttribute("y",f.barMargin);u.setAttribute("width",Math.max(0,l-w-1));u.setAttribute("height",f.barHeight);u.setAttribute("rx",f.barCornerRadius);u.setAttribute("ry",f.barCornerRadius);var t=f.standardBarClass;if(typeof b.standardBarClass!==c)t=b.standardBarClass;if(typeof b.barClass!==c)t=b.barClass;if(typeof t!==c)u.setAttribute("class", +t);else{t=f.standardBarStyle;if(typeof b.standardBarStyle!==c)t=b.standardBarStyle;if(typeof b.barStyle!==c)t=b.barStyle;typeof t!==c&&u.setAttribute("style",t)}j.appendChild(u);if(f.isTaskCompletedEffortVisible){u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",w);u.setAttribute("y",f.barMargin+f.completedBarMargin);u.setAttribute("width",Math.max(0,n-w-1));u.setAttribute("height",f.completedBarHeight);u.setAttribute("rx",f.completedBarCornerRadius);u.setAttribute("ry", +f.completedBarCornerRadius);t=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!==c)t=b.standardCompletedBarClass;if(typeof b.completedBarClass!==c)t=b.completedBarClass;if(typeof t!==c)u.setAttribute("class",t);else{t=f.standardCompletedBarStyle;if(typeof b.standardCompletedBarStyle!==c)t=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!==c)t=b.completedBarStyle;typeof t!==c&&u.setAttribute("style",t)}j.appendChild(u)}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly=== +c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)){u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",w);u.setAttribute("y",f.barMargin);u.setAttribute("width",Math.max(0,l-w-1));u.setAttribute("height",f.barHeight);u.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");f.isTaskStartReadOnly||j.appendChild(u);t=m.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",w-4);t.setAttribute("y",f.barMargin);t.setAttribute("width", +4);t.setAttribute("height",f.barHeight);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: w-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&j.appendChild(t);var o=m.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x",l-4);o.setAttribute("y",f.barMargin);o.setAttribute("width",8);o.setAttribute("height",f.barHeight);o.setAttribute("style","fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!= +"TouchEnabled"&&j.appendChild(o);var p=m.createElementNS("http://www.w3.org/2000/svg","rect");p.setAttribute("x",n-2);p.setAttribute("y",f.barMargin);p.setAttribute("width",6);p.setAttribute("height",f.barHeight);p.setAttribute("style","fill: White; fill-opacity: 0; cursor: ew-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){j.appendChild(p);var k=m.createElementNS("http://www.w3.org/2000/svg","title"),F=typeof f.areToolTipsSimplified===c||!f.areToolTipsSimplified? +g.getItemCompletion(b):NaN;k.appendChild(Q(m,!isNaN(F)?Math.round(F*1E4)/100+"%":""));p.appendChild(k)}qb(u,t,o,p,b,w,l,n,h,g,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=null;if(typeof f.allowCreatingStartDependencies===c||f.allowCreatingStartDependencies){n=m.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",w);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer"); +j.appendChild(n)}m=m.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx",l-2);m.setAttribute("cy",f.barMargin+f.barHeight/2);m.setAttribute("r",f.barHeight/4);m.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(m);ab(m,n,j,b,f.barMargin+f.barHeight/2,l-2,w,h,g,f)}}return j}},Hb=function(a,d,e){return function(b){var g=typeof d!==c?d:b.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,j=pb(b),l=H(b.start,f), +n=H(b.finish,f),w=f.barHeight*2.15/3,u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l);u.setAttribute("y",f.barMargin);u.setAttribute("width",Math.max(0,n-l-1));u.setAttribute("height",w);var t=f.summaryBarClass;if(typeof b.summaryBarClass!==c)t=b.summaryBarClass;if(typeof b.barClass!==c)t=b.barClass;if(typeof t!==c)u.setAttribute("class",t);else{var o=f.summaryBarStyle;if(typeof b.summaryBarStyle!==c)o=b.summaryBarStyle;if(typeof b.barStyle!==c)o=b.barStyle;typeof o!== +c&&u.setAttribute("style",o)}j.appendChild(u);if(f.isTaskCompletedEffortVisible&&f.isSummaryTaskCompletedEffortVisible){u=m.createElementNS("http://www.w3.org/2000/svg","rect");u.setAttribute("x",l);u.setAttribute("y",f.barMargin+f.completedBarMargin*2.15/3);u.setAttribute("width",Math.max(0,n-l-1)*g.getItemCompletion(b));u.setAttribute("height",f.completedBarHeight*2.15/3);u.setAttribute("rx",f.completedBarCornerRadius);u.setAttribute("ry",f.completedBarCornerRadius);var p=f.summaryCompletedBarClass; +if(typeof b.summaryCompletedBarClass!==c)p=b.summaryCompletedBarClass;if(typeof b.completedBarClass!==c)p=b.completedBarClass;if(typeof p!==c)u.setAttribute("class",p);else{p=f.summaryCompletedBarStyle;if(typeof b.summaryCompletedBarStyle!==c)p=b.summaryCompletedBarStyle;if(typeof b.completedBarStyle!==c)p=b.completedBarStyle;typeof p!==c&&u.setAttribute("style",p)}j.appendChild(u)}if(!b.isExpanded){u=m.createElementNS("http://www.w3.org/2000/svg","line");u.setAttribute("x1",l);u.setAttribute("y1", +f.barMargin+w+2.5);u.setAttribute("x2",n-1);u.setAttribute("y2",f.barMargin+w+2.5);p=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!==c)p=b.collapsedSummaryLineClass;if(typeof p!==c)u.setAttribute("class",p);else{p=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!==c)p=b.collapsedSummaryLineStyle;typeof p!==c&&u.setAttribute("style",p)}j.appendChild(u)}var p=m.createElementNS("http://www.w3.org/2000/svg","polygon"),u=f.barMargin-0.25,k=w+1.5,F=f.barHeight*3/4,s= +f.barHeight/4,w=l-1-f.barHeight/3;p.setAttribute("points",w+","+u+" "+w+","+(u+k)+" "+(w+F/2)+","+(u+k+s)+" "+(w+F)+","+(u+k)+" "+(w+F)+","+u);typeof t!==c&&p.setAttribute("class",t);typeof o!==c&&p.setAttribute("style",o);j.appendChild(p);p=m.createElementNS("http://www.w3.org/2000/svg","polygon");w=n+f.barHeight/3;p.setAttribute("points",w+","+u+" "+w+","+(u+k)+" "+(w-F/2)+","+(u+k+s)+" "+(w-F)+","+(u+k)+" "+(w-F)+","+u);typeof t!==c&&p.setAttribute("class",t);typeof o!==c&&p.setAttribute("style", +o);j.appendChild(p);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){t=null;if(typeof f.allowCreatingStartDependencies===c||f.allowCreatingStartDependencies){t=m.createElementNS("http://www.w3.org/2000/svg","circle");t.setAttribute("cx",l-0.5);t.setAttribute("cy",f.barMargin+f.barHeight/2);t.setAttribute("r",f.barHeight/4);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer"); +j.appendChild(t)}m=m.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx",n-0.5);m.setAttribute("cy",f.barMargin+f.barHeight/2);m.setAttribute("r",2.5);m.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(m);ab(m,t,j,b,f.barMargin+f.barHeight/2,n-1.5,l,h,g,f)}return j}},Ib=function(a,d,e){return function(b){var g=typeof d!==c?d:b.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,j=pb(b);if(f.isBaselineVisible&& +typeof b.baselineStart!==c){var l=H(b.baselineStart,f),n=m.createElementNS("http://www.w3.org/2000/svg","polygon"),w=f.barMargin-1,u=f.barHeight+1;n.setAttribute("points",l+","+w+" "+(l-u/2)+","+(w+u/2)+" "+l+","+(w+u)+" "+(l+u/2)+","+(w+u/2));l=f.baselineBarClass;if(typeof b.baselineBarClass!==c)l=b.baselineBarClass;if(typeof l!==c)n.setAttribute("class",l);else{var t=f.baselineBarStyle;if(typeof b.baselineBarStyle!==c)t=b.baselineBarStyle}n.setAttribute("style",t);j.appendChild(n)}n=H(b.start,f); +t=m.createElementNS("http://www.w3.org/2000/svg","polygon");n=n-1;w=f.barMargin;l=f.barHeight+1;t.setAttribute("points",n+","+w+" "+(n-l/2)+","+(w+l/2)+" "+n+","+(w+l)+" "+(n+l/2)+","+(w+l/2));w=f.milestoneBarClass;if(typeof b.milestoneBarClass!==c)w=b.milestoneBarClass;if(typeof b.barClass!==c)w=b.barClass;if(typeof w!==c)t.setAttribute("class",w);else{w=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!==c)w=b.milestoneBarStyle;if(typeof b.barStyle!==c)w=b.barStyle;typeof w!==c&&t.setAttribute("style", +w)}j.appendChild(t);if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)){t=m.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",n-l/2);t.setAttribute("y",f.barMargin);t.setAttribute("width",l);t.setAttribute("height",l);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(t);qb(t,null,null,null,b,n,n,n,h,g,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&& +!b.isPart){m=m.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx",n);m.setAttribute("cy",f.barMargin+f.barHeight/2);m.setAttribute("r",f.barHeight/4);m.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");j.appendChild(m);ab(m,null,j,b,f.barMargin+f.barHeight/2,n,n,h,g,f)}}return j}},Lb=function(a,d){return function(e,b){var g=e.ganttChartView,f=typeof d!==c?d:g.settings,h=typeof a!==c?a:g.items,m=g.ownerDocument,g=m.createElementNS("http://www.w3.org/2000/svg", +"g"),j;j=za(b.item,h,f);var l=za(e,h,f),h="M ",n,w,u=f.itemHeight,t=u/2,o=u/3.5,p=2,k=false,F;if(j==l&&(typeof b.dependencyType===c||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType===c||b.dependencyType=="FinishStart"||b.dependencyType=="FS"){n=H(b.item.finish,f);w=H(e.start,f)}else{n=H(b.item.start,f);w=H(e.finish,f)}j=j-l+0.5;h=h+(n+" "+(j+t)+" L "+(w+(w>n?-1:1)*(u/5-1))+" "+(j+t))}else{if(typeof b.dependencyType!== +c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){n=H(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled===c||b.item.isSummaryEnabled)?n=n-(f.barHeight/3+0.25):b.item.isMilestone&&(n=n-u/4);w=n-o}else{n=H(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled===c||b.item.isSummaryEnabled))n=n+(f.barHeight/3+0.25);else if(b.item.isMilestone)n=n+u/4;else{F=H(b.item.start,f)+4-1;no*2&&e.start>=b.item.finish)&&(l=w)}}if(typeof b.dependencyType!==c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"|| +b.dependencyType=="SF")){if(l>w){j=j-o/6;j=j<=0?j+t:j-t;h=h+(" "+w+" "+(j+t))}}else if(ln-p&&(p=-p);n=n-p}h=h+(" "+l+" "+j);k&&(h=h+(" "+n+" "+j))}j=h;h=m.createElementNS("http://www.w3.org/2000/svg","path");h.setAttribute("d",j);typeof f.dependencyLineZoneClass!==c&&h.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!==c&&h.setAttribute("style", +f.dependencyLineZoneStyle);g.appendChild(h);m=m.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",j);j=f.dependencyLineClass;if(typeof b.dependencyLineClass!==c)j=b.dependencyLineClass;if(typeof j!==c)m.setAttribute("class",j);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!==c)f=b.dependencyLineStyle;typeof f!==c&&m.setAttribute("style",f)}g.appendChild(m);return g}},Mb=function(a){return function(d,e){var b=d.ganttChartView.ownerDocument,g=b.createElementNS("http://www.w3.org/2000/svg", +"title");g.appendChild(Q(b,e.item.content+" - "+d.content));if(typeof a.areToolTipsSimplified===c||!a.areToolTipsSimplified){if(e.dependencyType){g.appendChild(b.createTextNode("\n"));g.appendChild(Q(b,"Type: "+ac(e.dependencyType)))}if(e.lag){g.appendChild(b.createTextNode("\n"));g.appendChild(Q(b,"Lag: "+e.lag/36E5+"h"))}}return g}},ac=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}}, +y=function(a,d,e,b){if(typeof a.ganttChartView!==c){var g=a.ganttChartView,f=g.settings;if(d=="start"||d=="minStart"||d=="maxStart"){if(typeof a.minStart!==c&&a.starta.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem===c)a.start=R(a.start,f,true,typeof a.isMilestone!==c&&a.isMilestone,D(a));if(e)a.preferredStart= +a.start}if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}else if(d=="finish"||d=="minFinish"||d=="maxFinish"){if(typeof a.maxFinish!==c&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem===c)a.finish=R(a.finish,f,typeof a.isMilestone!==c&&a.isMilestone,true,D(a))}else if(typeof a.minFinish!== +c&&a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}}if(g.isTimingInformationInitialized){var h=g.items,m,j;if(d=="indentation"||d=="predecessors")for(m=0;m< +h.length;m++){j=h[m];typeof j.dependsOf!==c&&delete j.dependsOf}if((d=="predecessors"||d=="start"||d=="finish")&&typeof a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring===c&&f.areTaskDependencyConstraintsEnabled&&(f.areTaskDependencyConstraintsEnabledWhileDragging||typeof g.isDuringTimeDragOperation===c)){a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring=true;for(j=a.parent;j!=null;){typeof j.predecessors!==c&&j.predecessors.length>0&&Ka(j,h,f,g);j=j.parent}j=a;for(typeof j.predecessors!== +c&&j.predecessors.length>0?Ka(j,h,f,g):rb(j,f);j!=null;){if(typeof j.successors===c){j.successors=[];for(m=0;m0&&(j=j+", ");n=Math.floor(l.value/h*1E6)/1E6;j=j+(l.key+(n!=1?" ["+n*100+"%]":""))}g.setItemAssignmentsContent(a,j)}f.itemPropertyChangeHandler(a,d,e,b);d=="isExpanded"?typeof a.ganttChartView!==c&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!== +c&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):d=="isSelected"&&typeof a.ganttChartView!==c&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!==c&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,e);typeof a.scheduleChartView!==c&&d=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},rb=function(a,d){if(typeof a.isAwaitingPreferredStartUpdates===c)if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var e=0;ef&&(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))){a.finish= +R(oa(f,b),b,a.isMilestone,true,D(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}e=true}}else if(d.dependencyType=="StartFinish"||d.dependencyType=="SF"){f=f.start;typeof d.lag!==c&&d.lag!=0&&(f=S(f,d.lag,b,D(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled=== +c||a.isSummaryEnabled))){a.finish=R(oa(f,b),b,a.isMilestone,true,D(a));if(a.finisha.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}e=true}}if(e&&!(typeof a.ganttChartView===c||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!==c))if(typeof a.ganttChartView!==c&&!a.ganttChartView.isTimingInformationInitialized)Y(a); +else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Y(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Ra=function(a,d){if(typeof a.dependsOf!==c&&typeof a.dependsOf[a]!==c)return a.dependsOf[d];try{if(a==d)return true;var e=cc(a);if(e.indexOf(d)>=0)return true;var b=cc(d);if(b.indexOf(a)>=0)return true;var g=sb(a),f,h;for(f=0;f=0||b.indexOf(h)>=0||Ra(h,d))return true}for(g=0;g=0||b.indexOf(h)>=0||Ra(h,d))return true}}var j=a.children;for(f=0;f0&&Ra(l,d))return true}}finally{if(typeof a.dependsOf===c)a.dependsOf={};a.dependsOf[d]=true}return a.dependsOf[d]=false},cc=function(a){for(var d=[];typeof a.parent!==c&&a.parent!=null;){(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)&&d.push(a.parent);a=a.parent}return d},sb=function(a){var d= +[];if(typeof a.predecessors!==c&&a.predecessors!=null)for(var e=0;eh||!b&&a==h)if(b)a=h;else{g=$(g);a=f}for(b=la(g);bj||Tb(g,d);){if(e){b++;g=$(g); +a=f}else{b--;g=La(g);a=h}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(g.valueOf()+a)},O=function(a,d,e,b){if(d.valueOf()=f){j=$(j);a=g}for(var l=X(d);j=h&&(n<=m&&!Tb(j,b))&&(e=e+(f-a));j=$(j);a=g}d=ja(d);df&&(d=f);d>a&&(e=e+(d-a));return e},S=function(a,d,e,b){if(d<0)return Sa(-d,a,e,b);a=R(a,e,true,false,b);if(d==0)return a;var g=typeof b!==c&&typeof b.workingDayStart!==c?b.workingDayStart:e.visibleDayStart,f=typeof b!==c&&typeof b.workingDayFinish!== +c?b.workingDayFinish:e.visibleDayFinish,h=ja(a);if(h+d0;){a=ja(a)>0?R($(X(a)),e,true,false,b):R(X(a),e,true,false,b);if(g+dg)return new Date(d.valueOf()-a);h=h-g;d=new Date(d.valueOf()-h);for(a=a-h;a>0;){d=ja(d)<864E5?R(X(d),e,false,true,b):R(La(X(d)),e,false,true,b);if(f-a>g)return new Date(d.valueOf()-a);h=f-g;d=new Date(d.valueOf()-h);a=a-h}return new Date(d.valueOf())},bb=function(a,d,e,b,c){return O(a,d,b,c)/O(a,e,b,c)},ec=function(a,d,e,b,c){return S(a,d*O(a,e,b,c),b,c)},Ta=function(a){for(var d=0,a=fa(a),e=0;ee){b=f.key;e=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=indexOfKey(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},qb=function(a,d,e,b,g,f,h,m,j,l,n){function w(b,d){l.isDuringTimeDragOperation=true;l.draggingItem=g;l.dragType="Start";l.style.cursor=a.style.cursor;l.draggingInitialX=b.clientX;l.draggingInitialStartPosition= +f;l.draggingInitialFinishPosition=h;l.draggingInitialCompletedFinishPosition=m;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!d){(u=DlhSoft.Controls.ToolTip.get(a))||(u=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +u.setContent(n.dateTimeFormatter(x(g.start))+" \u2013 "+n.dateTimeFormatter(x(g.finish)));u.show();u.originalX=u.x;l.toolTip=u}}var u;a.addEventListener("mousedown",function(a){if(a.button==0){w(a);a.preventDefault()}},true);a.addEventListener("touchstart",function(a){w(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend",g.touchEndHandler)},true);if(d!=null){var t=function(b,e){l.isDuringTimeDragOperation=true;l.draggingItem= +g;l.dragType="StartOnly";l.style.cursor=a.style.cursor;l.draggingInitialX=b.clientX;l.draggingInitialStartPosition=f;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!e){(u=DlhSoft.Controls.ToolTip.get(d))||(u=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));u.setContent(n.dateTimeFormatter(x(g.start))+" \u2013");u.show();u.setHorizontalPosition(u.x+4);u.originalX=u.x;l.toolTip=u}};d.addEventListener("mousedown",function(a){if(a.button==0){t(a);a.preventDefault()}},true);d.addEventListener("touchstart",function(a){t(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend", +g.touchEndHandler)},true)}if(e!=null){var o=function(a,b){l.isDuringTimeDragOperation=true;l.draggingItem=g;l.dragType="Finish";l.style.cursor=e.style.cursor;l.draggingInitialX=a.clientX;l.draggingInitialFinishPosition=h;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!b){(u=DlhSoft.Controls.ToolTip.get(e))||(u=DlhSoft.Controls.ToolTip.initialize(void 0,e,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));u.setContent("\u2013 "+n.dateTimeFormatter(x(g.finish)));u.show();u.setHorizontalPosition(u.x-u.contentContainer.clientWidth);u.originalX=u.x;l.toolTip=u}};e.addEventListener("mousedown",function(a){if(a.button==0){o(a);a.preventDefault()}}, +true);e.addEventListener("touchstart",function(a){o(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend",g.touchEndHandler)},true)}if(b!=null){var p=function(a,d){l.isDuringTimeDragOperation=true;l.draggingItem=g;l.dragType="CompletedFinish";l.style.cursor=b.style.cursor;l.draggingInitialX=a.clientX;l.draggingInitialCompletedFinishPosition=m;if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!d){(u=DlhSoft.Controls.ToolTip.get(b))|| +(u=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+n.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));var e=bb(g.start,g.completedFinish, +g.finish,n,D(g));if(!isNaN(e)){u.setContent(Math.round(e*1E4)/100+"%");u.show();u.setHorizontalPosition(u.x+2);u.originalX=u.x;l.toolTip=u}}};b.addEventListener("mousedown",function(a){if(a.button==0){p(a);a.preventDefault()}},true);b.addEventListener("touchstart",function(a){p(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",g.touchMoveHandler);a.target.addEventListener("touchend",g.touchEndHandler)},true)}if(typeof l.draggableItems===c)l.draggableItems=[];for(var k=false, +F=0;Fg.finish)d=g.finish;g.start=d;g.preferredStart=g.start;y(g,"start",true,false);if(l.dragType!="StartOnly"){if(g.isMilestone){g.finish=g.start;y(g,"finish",false,false);g.completedFinish=g.start}else{g.finish=S(g.start,e,n,D(g));y(g,"finish",false,false);g.completedFinish=S(g.start,m,n,D(g))}y(g,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&& +n.useUpdatingToolTips&&!b){u=l.toolTip;u.setContent(n.dateTimeFormatter(x(g.start))+" \u2013 "+n.dateTimeFormatter(x(g.finish)));u.setHorizontalPosition(u.originalX+(H(g.start,n)-l.draggingInitialStartPosition))}}else{if(g.finishe){g.completedFinish=e;y(g,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!b){u=l.toolTip;u.setContent("\u2013 "+n.dateTimeFormatter(x(g.finish))); +u.setHorizontalPosition(u.originalX+(H(g.finish,n)-l.draggingInitialFinishPosition))}Ua(g,j,l.chartContent,n)}else if(l.dragType=="CompletedFinish"){e=R(oa(Ca(l.draggingInitialCompletedFinishPosition+d,n),n),n,g.isMilestone,true,D(g));if(eg.finish)e=g.finish;if(e.valueOf()!=g.completedFinish.valueOf()){g.completedFinish=e;y(g,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&n.useUpdatingToolTips&&!b){u=l.toolTip;e=bb(g.start,g.completedFinish,g.finish,n,D(g));if(!isNaN(e)){u.setContent(Math.round(e* +1E4)/100+"%");u.setHorizontalPosition(u.originalX+(H(g.completedFinish,n)-l.draggingInitialCompletedFinishPosition))}}Ua(g,j,l.chartContent,n)}l.draggingItem=g;l.draggingPerformed=true}};l.addEventListener("mousemove",function(a){s(a)},true);l.addEventListener("touchmove",function(a){s(a.touches[0],true)},true);g.touchMoveHandler=function(a){s(a.touches[0],true)};var r=function(){if(!(typeof l.draggingItem===c||l.draggingItem!=g||l.dragType!="Start"&&l.dragType!="StartOnly"&&l.dragType!="Finish"&& +l.dragType!="CompletedFinish")){delete l.isDuringTimeDragOperation;var a=l.draggingItem;l.style.cursor="default";if(l.draggingPerformed){if(l.dragType=="Start"||l.dragType=="StartOnly"){y(a,"start",true,true);y(a,"finish",false,true);y(a,"completedFinish",false,true)}else if(l.dragType=="Finish"){y(a,"finish",true,true);y(a,"completedFinish",false,true)}else l.dragType=="CompletedFinish"&&y(a,"completedFinish",true,true);delete l.draggingPerformed}delete l.draggingItem}};document.addEventListener("mouseup", +function(a){a.button==0&&r()},true);document.addEventListener("touchend",function(){r()},true);g.touchEndHandler=function(){r()};l.draggableItems.push(g)}},ab=function(a,d,e,b,g,f,h,m,j,l){function n(d,e){delete j.cancelDrag;j.draggingItem=b;j.dragType="Dependency";j.dragDependencyType="Finish";j.style.cursor=a.style.cursor;j.draggingInitialX=d.clientX;j.draggingInitialY=d.clientY;j.draggingInitialRightPosition=f;j.draggingInitialTopPosition=g;j.draggingInitialFinishPosition=f;j.draggingInitialThumbPosition= +g;if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!e){(toolTip=DlhSoft.Controls.ToolTip.get(a))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")); +toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;j.toolTip=toolTip}}var w=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",function(a){if(a.button==0){n(a);a.preventDefault()}},true);a.addEventListener("touchstart",function(a){n(a.touches[0],true);a.preventDefault()},true);if(d!=null){var u=function(e,c){delete j.cancelDrag;j.draggingItem=b;j.dragType="Dependency";j.dragDependencyType= +"Start";j.style.cursor=a.style.cursor;j.draggingInitialX=e.clientX;j.draggingInitialY=e.clientY;j.draggingInitialRightPosition=h;j.draggingInitialTopPosition=g;j.draggingInitialFinishPosition=h;j.draggingInitialThumbPosition=g;e.preventDefault();if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!c){(toolTip=DlhSoft.Controls.ToolTip.get(d))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+ +l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;j.toolTip=toolTip}};d.addEventListener("mousedown",function(a){if(a.button==0){u(a); +a.preventDefault()}},true);d.addEventListener("touchstart",function(a){u(a.touches[0],true);a.preventDefault()},true)}a.addEventListener("mouseover",function(){if(typeof j.temporaryHoveringThumb!==c){var b=j.temporaryHoveringThumb;delete j.temporaryHoveringThumb;if(typeof b.originalStyle===c)return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof j.temporaryDependencyLine===c){a.mouseOver=true;j.temporaryHoveringThumb=a;a.originalStyle=a.getAttribute("style");typeof l.dependencyPointerClass!== +c&&a.setAttribute("class",l.dependencyPointerClass);typeof l.dependencyPointerStyle!==c&&a.setAttribute("style",l.dependencyPointerStyle);a.style.cursor="pointer"}},true);d!=null&&d.addEventListener("mouseover",function(){if(typeof j.temporaryHoveringThumb!==c){var a=j.temporaryHoveringThumb;delete j.temporaryHoveringThumb;if(typeof a.originalStyle===c)return;a.setAttribute("style",a.originalStyle);delete a.originalStyle}if(typeof j.temporaryDependencyLine===c){d.mouseOver=true;j.temporaryHoveringThumb= +d;d.originalStyle=d.getAttribute("style");typeof l.dependencyPointerClass!==c&&d.setAttribute("class",l.dependencyPointerClass);typeof l.dependencyPointerStyle!==c&&d.setAttribute("style",l.dependencyPointerStyle);d.style.cursor="pointer"}},true);a.addEventListener("mouseout",function(){delete a.mouseOver;setTimeout(function(){if(!(typeof a.originalStyle===c||a.mouseOver)){a.setAttribute("style",a.originalStyle);delete a.originalStyle}},250)},true);d!=null&&d.addEventListener("mouseout",function(){delete d.mouseOver; +setTimeout(function(){if(!(typeof d.originalStyle===c||d.mouseOver)){d.setAttribute("style",d.originalStyle);delete d.originalStyle}},250)},true);if(typeof j.draggableDependencyItems===c)j.draggableDependencyItems=[];for(var t=false,o=0;oo||mb(h,b)||Da(h,b)||Da(b,h))h=null;if(h!=null&&(typeof l.allowCreatingToFinishDependencies===c||l.allowCreatingToFinishDependencies)&& +!h.isMilestone&&u>t+(o-t)*3/4)p="Finish"}toolTip.setContent(b.content+" \u2013"+(h!=null?" "+h.content+(p!="Finish"?"":" \u2022"):""));toolTip.setPosition(toolTip.originalX+f,toolTip.originalY+g)}}}};j.addEventListener("mousemove",function(a){p(a)},true);j.addEventListener("touchmove",function(a){p(a.touches[0],true)},true);var k=function(a){if(!(typeof j.draggingItem===c||j.draggingItem!=b||j.dragType!="Dependency")){if(typeof j.temporaryDependencyLine!==c){try{e.removeChild(j.temporaryDependencyLine)}catch(d){}delete j.temporaryDependencyLine}for(var f= +Math.floor((b.itemTop+j.draggingInitialThumbPosition+(a.clientY-j.draggingInitialY))/l.itemHeight),g=null,n=0,h=0;h= +f&&a<=n&&!mb(g,b)&&!Da(g,b)&&!Da(b,g)){a=g==null||typeof l.allowCreatingToFinishDependencies!==c&&!l.allowCreatingToFinishDependencies||g.isMilestone||a<=f+(n-f)*3/4?"Start":"Finish";delete b.successors;if(typeof g.predecessors===c)g.predecessors=[];f={item:b};if(j.dragDependencyType!="Start"){if(a=="Finish")f.dependencyType="FF"}else f.dependencyType=a!="Finish"?"SS":"SF";g.predecessors.push(f);y(g,"predecessors",true,true);if(g.start=d.gridContentContainer.offsetWidth+d.chartContentContainer.clientWidth-24){e=d.chartContentContainer.scrollLeft;d.chartContentContainer.scrollLeft=d.chartContentContainer.scrollLeft+20;e=d.chartContentContainer.scrollLeft-e;if(typeof d.draggingInitialStartPosition!==c)d.draggingInitialStartPosition=d.draggingInitialStartPosition+e;if(typeof d.draggingInitialFinishPosition!==c)d.draggingInitialFinishPosition=d.draggingInitialFinishPosition+e;if(typeof d.draggingInitialCompletedFinishPosition!== +c)d.draggingInitialCompletedFinishPosition=d.draggingInitialCompletedFinishPosition+e}}},Oc=function(a){var d=0;if(a.offsetParent){do{d=d+a.offsetTop;a=a.offsetParent}while(a)}return d},gc=function(a,d){if(typeof d.draggingItem!==c){var a=a-Oc(d),e,b;if(a=d.chartHeaderContainer.clientHeight+d.chartContentContainer.clientHeight-24){e=d.chartContentContainer.scrollTop;d.chartContentContainer.scrollTop=d.chartContentContainer.scrollTop+20;if(typeof d.isDuringVerticalScrolling===c){d.isDuringVerticalScrolling=true;setTimeout(function(){b=d.chartContentContainer.scrollTop-e;d.draggingInitialThumbPosition= +d.draggingInitialThumbPosition+b;delete d.isDuringVerticalScrolling},0)}}}},Ua=function(a,d,e,b){ea(a.chartItem,a,b);pa(d,a);setTimeout(function(){if(typeof a.gridItem!==c){if(typeof a.completedInput!==c){var g=a.completedInput;typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);delete a.completedInput}Aa(a.gridItem,a,d,b.columns,e,b.toggleButtonAreaWidth,b)}for(g=a.parent;g!=null;){Ya(g,false);a=g;ea(a.chartItem,a,b);pa(d,a);typeof a.gridItem!==c&&Aa(a.gridItem, +a,d,b.columns,e,b.toggleButtonAreaWidth,b);g=a.parent}},0)},hc=function(a){var d=a.itemTop-a.ganttChartView.chartContentContainer.scrollTop;if(d<0)a.ganttChartView.chartContentContainer.scrollTop=a.itemTop;else if(d>a.ganttChartView.chartContentContainer.clientHeight-a.ganttChartView.settings.itemHeight)a.ganttChartView.chartContentContainer.scrollTop=a.itemTop-(a.ganttChartView.chartContentContainer.clientHeight-a.ganttChartView.settings.itemHeight)},Bc=function(a,d,e,b,g,f,h,m,j,l,n,w,u,t){var o, +p;d.addEventListener("scroll",function(){if(h.scrollTop!=d.scrollTop&&!p){o=true;setTimeout(function(){h.scrollTop=d.scrollTop;setTimeout(function(){o=false},100)},200)}if(b.scrollLeft!=d.scrollLeft)b.scrollLeft=d.scrollLeft},true);cb(d,e,g,t);typeof a.updateGridHeaderTimer!==c&&clearInterval(a.updateGridHeaderTimer);a.updateGridHeaderTimer=setInterval(function(){try{cb(d,e,g,t)}catch(b){try{clearInterval(a.updateGridHeaderTimer)}catch(c){}}},100);h.addEventListener("scroll",function(){if(d.scrollTop!= +h.scrollTop&&!o){p=true;setTimeout(function(){d.scrollTop=h.scrollTop;setTimeout(function(){p=false},100)},200)}if(m.scrollLeft!=h.scrollLeft)m.scrollLeft=h.scrollLeft;va(u,h,t);Ma(u,n,t);t.displayedTime=Ca(h.scrollLeft,t);(typeof a.isDuringScrollToDateTime===c||!a.isDuringScrollToDateTime)&&typeof t.displayedTimeChangeHandler!==c&&setTimeout(function(){t.displayedTimeChangeHandler(t.displayedTime)},0);typeof a.isDuringScrollToDateTime!==c&&delete a.isDuringScrollToDateTime},true);setTimeout(function(){if(m.scrollLeft!= +h.scrollLeft)m.scrollLeft=h.scrollLeft;va(u,h,t)},1);cb(h,j,l,t);typeof a.updateChartHeaderTimer!==c&&clearInterval(a.updateChartHeaderTimer);a.updateChartHeaderTimer=setInterval(function(){try{cb(h,j,l,t)}catch(b){try{clearInterval(a.updateChartHeaderTimer)}catch(d){}}},100);window.addEventListener("mousewheel",function(){try{a.cancelDrag=true}catch(b){}},true)},cb=function(a,d,e,b){setTimeout(function(){try{var c=d.clientWidth-a.clientWidth;c<0&&(c=0);var f=c+"px";if(e.style.width!=f){e.style.width= +f;if(c>0){e.style.boxSizing="border-box";e.style.MozBoxSizing="border-box";e.style.border="solid 1px "+b.border;e.style.borderTop="none";e.style.borderRight="none"}else{e.style.border="";e.style.borderTop="";e.style.borderRight="";e.style.boxSizing="";e.style.MozBoxSizing=""}}}catch(h){}},0)},Ba=function(a,d,e){if(e.isSplitterEnabled){a.style.height=d.clientHeight+"px";a.style.left=Math.max(0,d.offsetWidth-1)+"px"}},va=function(a,d,e){if(!(typeof d.isInitializing!==c&&d.isInitializing)&&e.isVirtualizing)for(var b= +d.scrollTop-e.itemHeight,d=b+d.clientHeight+2*e.itemHeight,g=0;g=b&&f.itemTop=d))&&delete f.isVirtuallyVisible}},yc=function(a,d){for(var e=a.childNodes.length;e-- >0;)a.removeChild(a.childNodes[e]);a.appendChild(d)},vb=function(a,d,e,b){var g=b.indexOf(a);if(!(g<0||d<0||d==g||d>=b.length)){b.splice(g,1);b.splice(d,0,a);ic(b);T(e);typeof e.settings.itemMoveHandler!==c&&e.settings.itemMoveHandler(a, +g,d)}},db=function(a,d,e,b,g){if(!(a<0||e<0||e==a||e>g.length-d)){var f=[],h;for(h=a;hd){b.indentation=d;y(b,"indentation",false,true)}d=b.indentation+1}},Pc=function(a,d,e,b,g,f,h,m,j,l){function n(e){delete b.cancelDrag;b.draggingItem= +d;b.dragType="Ordering";b.style.cursor=a.style.cursor;b.draggingInitialY=e.clientY;b.draggingInitialThumbPosition=0;b.resetChartAreaDefinitions()}a.addEventListener("mousedown",function(a){if(a.button==0){n(a);a.preventDefault()}},true);a.addEventListener("touchstart",function(a){n(a.touches[0]);a.preventDefault()},true);if(typeof b.draggableOrderingItems===c)b.draggableOrderingItems=[];for(var w=false,u=0;ul)||typeof n.displayRowIndex===c&&(z++l+1))){p={content:n.content,indentation:n.indentation,start:n.start,finish:n.finish,completedFinish:n.completedFinish,isMilestone:n.isMilestone,schedule:D(n),assignmentsContent:n.assignmentsContent,baselineStart:n.baselineStart,baselineFinish:n.baselineFinish,isBarVisible:n.isBarVisible,isRelativeToTimezone:n.isRelativeToTimezone,"class":n["class"],style:n.style,barClass:n.barClass,standardBarClass:n.standardBarClass,completedStandardBarClass:n.completedStandardBarClass, +summaryBarClass:n.summaryBarClass,milestoneBarClass:n.milestoneBarClass,baselineBarClass:n.baselineBarClass,barStyle:n.barStyle,standardBarStyle:n.standardBarStyle,completedStandardBarStyle:n.completedStandardBarStyle,summaryBarStyle:n.summaryBarStyle,milestoneBarStyle:n.milestoneBarStyle,baselineBarStyle:n.baselineBarStyle,isSummaryEnabled:n.isSummaryEnabled,isParentSummarizationEnabled:n.isParentSummarizationEnabled,isHidden:n.isHidden,isExported:true,tag:n};if(typeof n.displayRowIndex!==c)p.displayRowIndex= +n.displayRowIndex-j;Qc(p,n);a.push(p);n.exportItem=p}}for(k=0;kl))){p=n.exportItem;if(typeof n.predecessors!==c){p.predecessors=[];for(z=0;zl)||p.predecessors.push({item:y.item.exportItem,dependencyType:y.dependencyType,lag:y.lag,dependencyLineClass:y.dependencyLineClass, +dependencyLineStyle:y.dependencyLineStyle})}}}}var E=q.createElement("p");E.innerHTML=typeof d!==c?d:"";q.body.appendChild(E);var G=q.createElement("div");G.setAttribute("style","width: "+v+"px");try{DlhSoft.Controls.GanttChartView.initialize(G,a,g,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(U){}setTimeout(function(){x&&q.body.setAttribute("style","margin: 0px");var a=q.createElement("div");a.appendChild(G); +q.body.replaceChild(a,E);if(u){a.setAttribute("style","width: "+G.offsetHeight+"px; height: "+v+"px; overflow: hidden");a=Math.round((G.offsetWidth-G.offsetHeight)/2);G.setAttribute("style","width: "+v+"px; transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px); -webkit-transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px)")}q.close();if(typeof C!==void 0){C.focus();if(typeof w!==c&&w){C.print();(typeof t===c||t)&&setTimeout(function(){C.close()})}}},0)},kc=function(a){var d= +ia;if(typeof a===c)return d;for(var e=0;ed)d=b.finish}else if(b.start>d)d=b.start}return new Date(d.valueOf())},lc=function(a,d){for(var e= +0,b=0;b=g)return true;var f;if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var h=a.successorPredecessors?a.successorPredecessors:eb(a,e);for(f=0;f0)&&Ka(g,a,d,e)}},oc=function(a,d,e,b){var d=new Date(d.valueOf()-d.getTimezoneOffset()*6E4),d=ra(d,b,D(a)),e=da(a,b),c=ya(a,b);yb(a,d);Wa(a,e,b);Xa(a,c,b);Y(a)},pc=function(a,d){for(var e=0,b=fa(a),g=0;g=0?e=e+d.specificResourceUsageCosts[m].value*f.value:typeof d.defaultResourceUsageCost!==c&&(e=e+d.defaultResourceUsageCost*f.value);if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var j=da(a,d)/36E5;typeof d.specificResourceHourCosts!==c&&(m=indexOfKey(d.specificResourceHourCosts,h))>=0?e=e+d.specificResourceHourCosts[m].value*j*f.value:typeof d.defaultResourceHourCost!==c&&(e=e+d.defaultResourceHourCost*j*f.value)}}return e},Ab=function(a,d){var e=typeof d.taskInitiationCost!== +c?d.taskInitiationCost:0,e=e+pc(a,d);if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var b=0;b0){n=true;break}u=u.parent}if(!n)continue}g.push({key:j,value:Sc(j)});var u=!f?fa(j):[],t=[];for(n=0;n0&&t.push(o)}m.push({key:j,value:t});w.push(j)}}e=[];for(f=g.length;f>0;){h=[];for(l=0;l=0&&h.indexOf(o)<0){n=false;break}}if(n){t=j;n=d;u=b;if(typeof t.minStart!== +c&&nn&&(n=p);break;case "StartStart":case "SS":p=S(p.item.start,typeof p.lag===c?0:p.lag,u,D(p.item));p>n&&(n=p)}}}for(t=t.parent;t!=null&&typeof t.isSummaryEnabled!==c&&!t.isSummaryEnabled;)t= +t.parent}u=n;n=indexOfKey(m,j);var t=m[n].value,r;for(n=0;n=0){p=1;if(typeof b.resourceQuantities!==c){var s=indexOfKey(b.resourceQuantities,r);if(s>=0)p=b.resourceQuantities[s].value}previousAllocations=e[k].value;for(k=0;ku&&(u=s)}}}}if((a||!Fa(j))&&(u=ra(u,b,D(j)))!=j.start){n=da(j,b);o=ya(j,b);yb(j,u);Wa(j,n,b);Xa(j,o,b)}p=j.finish; +for(n=0;nu){C=r+o;x=zq[C])q[v].value=x;zs[v].value)s[v].value=x}}h.push(j)}}for(l= +0;l +a.start},da=function(a,d){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){for(var e=0,b=a.children,g=0;g0;){a=d[g];a.indentation==0&&b++}return b+(!e?1:0)}return tc(b,d)+"."+(b.children.indexOf(a)+(!e?1:0))},fa=function(a){var d;a=a.assignmentsContent;if(typeof a===c)d=[];else{for(var a= +a.split(","),e=[],b=0;b=0&&m>=0){m=trim(g.substr(h+1,m-h-1));g=trim(g.substr(0,h));h=m.indexOf("%");h>=0&&(m=trim(m.substr(0,h)));try{d=parseFloat(m);f=d/100}catch(j){f=1}}if(!(g.length<=0)){h=indexOfKey(e,g);h<0?e.push({key:g,value:f}):e[h].value=e[h].value+f}}d=e}return d},uc=function(a){for(var d=[],a=fa(a),e=0;e0;){var m=dequeue(h);if(!(m.finish<=m.start))if(e.length==0)e.push({key:m,value:f.value});else{kc(d);for(var j=false,l=0;l=n.finish))if(m.finish<=n.start){for(j=0;j<=l;j++)if(e[j].key.start>=m.start){e.splice(j,0,{key:m,value:f.value});break}j=true;break}else if(m.start<=n.start&&m.finish>=n.finish){e[l].value=w+f.value;m.start< +n.start&&h.push({start:m.start,finish:n.start});m.finish>n.finish&&h.push({start:n.finish,finish:m.finish});j=true;break}else if(m.start>=n.start&&m.finish<=n.finish){e.splice(l,1);m.start>n.start&&e.splice(l++,0,{key:{start:n.start,finish:m.start},value:w});e.splice(l++,0,{key:m,value:w+f.value});m.finish=n.start&&m.finish>=n.finish){e.splice(l,1);m.start>n.start&&e.splice(l++,0,{key:{start:n.start, +finish:m.start},value:w});e.splice(l++,0,{key:{start:m.start,finish:n.finish},value:w+f.value});m.finish>n.finish&&h.push({start:n.finish,finish:m.finish});j=true;break}else if(m.start<=n.start&&m.finish<=n.finish){e.splice(l,1);m.start=0)return true;for(var f=0;f=0||d.splice(d.length,0,h)}}}a.items=d;a.settings=e;a.refresh=function(){T(a)};a.refreshItems=function(){Pa(d)};a.refreshGridItems=function(){for(var a=0;a1;){var u=f.childNodes[g];u.tag!="Scale-Highlighting-CurrentTime"&&u.tag!="Scale-Separator-CurrentTime"&&h.push(u);f.removeChild(u)}hb(b,f,e.scales,e,true);for(g=h.length;g-- >0;)f.appendChild(h[g]);ta(c,ua(d,e))}; +a.setCurrentTime=function(b){e.currentTime=b;a.refreshCurrentTimeLine()};a.updateCurrentTime=function(){var b=new Date,b=new Date(b.valueOf()-b.getTimezoneOffset()*6E4);a.setCurrentTime(b)};a.getCurrentItem=function(){return a.currentItem};a.getSelectedItem=function(){return a.selectedItem};a.getSelectedItems=function(){return a.selectedItems};a.selectItem=function(a){r(a,true,e.selectionMode)};a.unselectItem=function(a){r(a,false,e.selectionMode)};a.expandItem=function(a){ga(a,true,true)};a.collapseItem= +function(a){ga(a,false,true)};a.scrollToItem=hc;a.scrollToBottom=function(){a.chartContentContainer.scrollTop=a.chartContent.clientHeight};a.scrollToDateTime=function(b){a.isDuringScrollToDateTime=true;a.chartContentContainer.scrollLeft=H(b,a.settings)};a.increaseTimelinePage=function(b){e.timelineStart=new Date(e.timelineStart.valueOf()+b);e.timelineFinish=new Date(e.timelineFinish.valueOf()+b);T(a)};a.decreaseTimelinePage=function(b){e.timelineStart=new Date(e.timelineStart.valueOf()-b);e.timelineFinish= +new Date(e.timelineFinish.valueOf()-b);T(a)};a.setSplitterPosition=function(b){var d=a.gridContainer,f=a.chartContainer,g=a.splitter,b=Math.floor(b*1E6/a.offsetWidth)/1E4;typeof d.percent!==c&&delete d.percent;d.style.width=b+"%";f.style.width=100-b+"%";Ba(g,d,e)};a.getChartPosition=function(a){return H(a,e)};a.getChartWidth=function(){return H(e.timelineFinish,e)};a.getDateTime=function(a){return Ca(a,e)};a.getWorkingTime=function(a){return dc(a,e)};a.getStartWorkingTime=function(a){return ra(a, +e)};a.getFinishWorkingTime=function(a){return R(a,e,false,true,void 0)};a.getEffort=function(a,b){return O(a,b,e)};a.getFinish=function(a,b){return S(a,b,e)};a.getStart=function(a,b){return Sa(a,b,e)};a.getCompletion=function(a,b,d){return bb(a,b,d,e)};a.getCompletedFinish=function(a,b,d){return ec(a,b,d,e)};a.getItemsHeight=function(){return ua(d,e)};a.getItemTop=function(a){return za(a,d,e)};a.onItemPropertyChanged=y;a.initializeTaskDraggingThumbs=function(b,d,e,c,f,g,h,o){qb(b,d,e,c,f,g,h,o,a.items, +a,a.settings)};a.initializeDependencyDraggingThumbs=function(b,d,e,c,f,g,h){ab(b,d,e,c,f,g,h,a.items,a,a.settings)};a.insertItem=function(b,c){Zb(b,c,a,d,e)};a.addItem=function(b){a.insertItem(d.length,b)};a.insertItems=function(b,d){for(var e=0;e0?a.items[b.index-1]:null;if(!(f==null||b.indentation>f.indentation)){ga(b,true,false,true);b.indentation++;y(b,"indentation",true,true);if(b.predecessors&&b.predecessors.length>0){for(var g=false,n=0;nf.indentation){b.predecessors.splice(n--,1);g=true}g&&y(b,"predecessors",false,true)}for(g=0;gn.predecessors[h].item.indentation){n.predecessors.splice(h--,1);y(n,"predecessors",false,true);ma(n);qa(n)}}$a(d,e)&&Pa(d);for(Qa(b,d,a,e);b!=null;){b.isExpanded||ga(b,true,false);b=b.parent}}};a.decreaseItemIndentation=function(b){var f=b.index0){for(var g=false,n=0;na.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}};a.setItemIsMilestone=function(a,b){a.isMilestone=b;y(a,"isMilestone",true,true)}; +a.getItemEffort=function(a){return da(a,e)};a.setItemEffort=function(a,b){a.finish=S(a.start,b,e,D(a));y(a,"finish",true,true);if(a.completedFinish>a.finish){a.completedFinish=a.finish;y(a,"completedFinish",false,true)}};a.getItemTotalEffort=function(a){return tb(a)};a.setItemTotalEffort=function(a,b){a.ganttChartView.setItemEffort(a,b/Ta(a))};a.setItemHasFixedEffort=function(a,b){a.hasFixedEffort=b;if(!a.hasChildren&&a.hasFixedEffort){a.fixedEffort=da(a,e);a.fixedEffortAssignments=fa(a)}};a.getItemDuration= +function(a){return O(a.start,a.finish,e,D(a))};a.setItemDuration=a.setItemEffort;a.getItemCompletedEffort=function(a){return ya(a,e)};a.setItemCompletedEffort=function(a,b){a.completedFinish=S(a.start,b,e,D(a));if(a.completedFinish>a.finish)a.completedFinish=a.finish;y(a,"completedFinish",true,true)};a.getItemTotalCompletedEffort=function(a){return ub(a)};a.setItemTotalCompletedEffort=function(a,b){a.ganttChartView.setItemCompletedEffort(a,b/Ta(a))};a.getItemCompletion=function(b){return a.getItemCompletedEffort(b)/ +a.getItemEffort(b)};a.setItemCompletion=function(b,d){a.setItemCompletedEffort(b,d*a.getItemEffort(b))};a.isItemCompleted=function(b){return a.getItemCompletion(b)>=1||(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())&&typeof b.isSetAsCompleted!==c&&b.isSetAsCompleted};a.setItemAsCompleted=function(b){if(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())b.isSetAsCompleted=true;a.setItemCompletion(b,1)};a.hasItemStarted=function(a){return Fa(a)};a.setItemAsNotStarted=function(b){if(b.isMilestone|| +b.finish.valueOf()<=b.start.valueOf())b.isSetAsCompleted=false;a.setItemCompletion(b,0)};a.isItemOnSchedule=function(a){var b=new Date,b=new Date(b.valueOf()-b.getTimezoneOffset()*6E4);return a.completedFinish>=b};a.setItemAssignmentsContent=function(a,b){a.assignmentsContent=b;y(a,"assignmentsContent",true,true)};a.getItemPredecessorsString=function(a,b){var e=b;typeof e===c&&(e=false);var f="";if(!(typeof a.predecessors===c||a.predecessors.length==0))for(var g=0;g0&&(f=f+", ");f=f+(t+(!e?1:0));if(typeof h.dependencyType!==c&&h.dependencyType!=""&&h.dependencyType!="FinishStart"&&h.dependencyType!="FS")if(h.dependencyType=="StartStart"||h.dependencyType=="SS")f=f+"SS";else if(h.dependencyType=="FinishFinish"||h.dependencyType=="FF")f=f+"FF";else if(h.dependencyType=="StartFinish"||h.dependencyType=="SF")f=f+"SF";if(typeof h.lag!==c&&h.lag!=0){h.lag>0&&(f=f+"+");f=f+h.lag/36E5}}}return f};a.setItemPredecessorsString= +function(a,b,e){typeof e===c&&(e=false);var f=[];a.predecessors=f;for(var b=b.split(","),g=0;g=48&&h.charCodeAt(t)<=57;)t++;var o=h.substr(0,t),o=parseInt(o)-(!e?1:0);if(!isNaN(o)&&!(o<0||o>=d.length)){o=d[o];if(!mb(a,o)&&!Da(a,o)&&!Da(o,a)){var h=h.substr(t),t=h.indexOf("+"),p=h.indexOf("-"),k=t>=0?t:p>=0?p:-1,p=0;if(k>=0){var r=parseFloat(h.substr(k+1));isNaN(r)||(p=r*(t>=0?1:-1)*36E5)}h=(k<0?h:h.substr(0, +k)).toUpperCase();f.push({item:o,dependencyType:h,lag:p})}}}}for(e=0;e=d.length-1||vb(b,e+1,a,d)};a.moveItemHierarchy=function(b,e){for(var c=d.indexOf(b),f=c+1;f0;){if(d[f].indentation=b.finish)b=null;else{var h=d.indexOf(b);if(h<0)b=null;else{f={content:typeof f===c?b.content:b.content+f,indentation:b.indentation,isExpanded:b.isExpanded,start:b.completedFinish,finish:b.finish,assignmentsContent:b.assignmentsContent,isReadOnly:b.isReadOnly,isHidden:b.isHidden,isBarVisible:b.isBarVisible,isBarReadOnly:b.isBarReadOnly,isSummaryEnabled:b.isSummaryEnabled,isParentSummarizationEnabled:b.isParentSummarizationEnabled, +displayRowIndex:b.displayRowIndex,"class":b["class"],style:b.style,barClass:b.barClass,standardBarClass:b.standardBarClass,summaryBarClass:b.summaryBarClass,milestoneBarClass:b.milestoneBarClass,baselineBarClass:b.baselineBarClass,barStyle:b.barStyle,standardBarStyle:b.standardBarStyle,summaryBarStyle:b.summaryBarStyle,milestoneBarStyle:b.milestoneBarStyle,baselineBarStyle:b.baselineBarStyle,taskTemplate:b.taskTemplate,template:b.template,tag:b.tag};if(typeof g!==c)b.content=b.content+g;b.finish= +b.completedFinish;Zb(h+1,f,a,d,e);g=eb(b,d);for(h=0;h0){t=true;break}k=k.parent}if(!t)continue}oc(u,g,d,e);o.push(u)}}xb(d,e,a);for(h=0;h0){var h=0;for(c=0;c0){for(c=0;c0&&(f=f+", ");f=f+(g[c].key+(g.length>1?" ["+Math.round(g[c].value/h*1E4)/100+"%]":""))}e.assignmentsContent=f;y(e,"assignmentsContent",false,true);Y(e)}}}};a.levelResources=function(b,c){return qc(b,c,d,e,a)};a.getItemSuccessors=function(a){return nc(a,d)};a.getItemSuccessorPredecessorItems=function(a){return eb(a,d)};a.getItemAllocationUnits= +Ta;a.getItemAssignments=fa;a.getItemAssignedResources=uc;a.getResourceAssignments=function(a){return Ga(a,d)};a.getResourceAssignedItems=function(a){for(var b=[],a=Ga(a,d),e=0;e=0?b=b+e.specificResourceUsageCosts[h].value*g.value:typeof e.defaultResourceUsageCost!==c&&(b=b+e.defaultResourceUsageCost*g.value);var o=g.key;if(!o.hasChildren||!(typeof o.isSummaryEnabled===c||o.isSummaryEnabled)){o=da(o,e)/36E5;typeof e.specificResourceHourCosts!==c&&(h=indexOfKey(e.specificResourceHourCosts,resource))>=0?b=b+e.specificResourceHourCosts[h].value* +o*g.value:typeof e.defaultResourceHourCost!==c&&(b=b+e.defaultResourceHourCost*o*g.value)}}return b};a.getProjectCost=function(){for(var a=0,b=0;b=0)p=e.resourceQuantities[r].value}r=e.maxLoadChartDisplayedResourceQuantity;typeof r===c&&(r=100);p>r&&(p=r);h.ganttChartItems.push({start:k.key.start,finish:k.key.finish, +units:k.value/p,content:Math.round(k.value*1E4)/100+"%",isRelativeToTimezone:false})}b.push(h)}return b};a.getFilteredGanttChartItems=function(a){for(var a=[a],b=[],e=0;e=0)){g.push({tag:o,content:o.content,start:o.start,finish:o.finish,completedFinish:o.completedFinish,isMilestone:o.isMilestone, +assignmentsContent:a.length>1?o.assignmentsContent:h[f].value!=1?Math.round(h[f].value*1E4)/100+"%":"",minStart:o.minStart,maxStart:o.maxStart,minFinish:o.minFinish,maxFinish:o.maxFinish,isHidden:o.isHidden,isBarVisible:o.isBarVisible,isBarReadOnly:o.isBarReadOnly,isReadOnly:true,isRelativeToTimezone:o.isRelativeToTimezone});b.push(o)}}}return g};a.copyCommonSettings=function(a){copyCommonSettings(a,e)};a.getPertChartItems=function(a,b,f,g,h,o){var k=a,r=b,p=f,s=h,f=o;if(typeof k===c||k<0)k=Number.MAX_VALUE; +typeof r===c&&(r="Start");typeof p===c&&(p="Finish");typeof s===c&&(s=" completed");typeof f===c&&(f=" starting");for(var q=new Date((new Date(1E4,0,1)).valueOf()-1),o=[],v,C,x,z,y,h=[],a=0;ax)x=b.finish}v==null&&(v=q);r={content:r,displayedText:(k++).toString(),displayedRowIndex:0,displayedColumnIndex:0};o.push(r);A=[r];q=[];for(a=0;a0){A=[];for(a=0;av){x={content:b.content!=null?b.content.toString()+f:null,displayedText:z,predecessors:[]};o.push(x);x.predecessors.push({item:r,content:g,isEffortVirtual:true})}z={content:b.content+s,displayedText:z+(x!=r?"'":""),predecessors:[],tag:b};A.push(z);o.push(z);z.predecessors.push({item:x,content:getContentPath(b),displayedText:b.content!=null?b.content.toString():null,effort:O(b.start,b.finish,e, +D(b)),tag:b})}do{B=[];for(a=0;a=0&&E.push(h[v].key);if(E.length>0){B.splice(B.indexOf(q),1);for(v=0;v1){s={content:b.content!=null?b.content.toString()+ +f:null,displayedText:q.displayedText,predecessors:[]};o.splice(o.indexOf(q),0,s);k=s.predecessors;for(x=0;xra(a.finish,e)){x={content:b.content!= +null?b.content.toString()+f:null,displayedText:q.displayedText,predecessors:[]};o.splice(o.indexOf(q),0,x);x.predecessors.push({item:p.item,content:g,isEffortVirtual:true});q.predecessors.splice(0,q.predecessors.length);q.predecessors.push({item:x,content:getContentPath(b),displayedText:b.content!=null?b.content.toString():null,effort:O(b.start,b.finish,e,D(b)),tag:b});q.displayedText=q.displayedText+"'"}}}}for(a=0;aC)C=r.finish}p==null&&(p=b);C==null&&(C=f);h={content:h,displayedText:h,earlyStart:p,earlyFinish:p,lateStart:b,lateFinish:b,isMilestone:true,effort:0,displayedRowIndex:0,displayedColumnIndex:0};a.push(h); +g=[h];p=[];for(k=0;k0){g=[];for(k=0;k=0&&A.push(z[p].key);if(A.length>0){y.splice(y.indexOf(v),1);for(p=0;px.earlyStart){x.earlyStart= +s;x.earlyFinish=S(x.earlyStart,x.effort,e)}x.predecessors.push({item:v,tag:r})}s=true}}g=y}while(s)}o={content:o,displayedText:o,earlyStart:f,earlyFinish:f,lateStart:C,lateFinish:C,isMilestone:true,effort:0,predecessors:[],displayedRowIndex:0};a.push(o);p=o.predecessors;for(k=0;ko.earlyStart){o.earlyStart=s;o.earlyFinish=o.earlyStart}p.push({item:z})}for(g=[o];g.length>0;){z=[];for(k=0;k0?R(r,e,false,true,void 0):r;x.lateStart=Sa(x.effort,x.lateFinish,e)}}}g=z}if(a.length>2)for(k=0;k100&&(a=100);b(a)},c,f,h)},timeSpanInputColumnTemplateBase:function(a,d,e,b,g,f,h,m){typeof g===c&&(g=1);return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(a,d,function(){var a=e()/(36E5*g);return Math.round(a*100)/100},function(a){a=parseFloat(a);a<0&&(a=0);b(a*36E5*g)},f,h,m)},datePickerInputColumnTemplateBase:function(a,d,e,b,g,f,h,m,j,l,n,o,k){n||(n=["Su","Mo","Tu", +"We","Th","Fr","Sa"]);var r=o,s=k;if(!o)o=DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter;if(!k)k=DlhSoft.Controls.GanttChartView.defaultDateTimeParser;var p=a.createElement("input");p.setAttribute("type","text");e=e();typeof e===c?e="":e!=null&&(e=o(e));p.setAttribute("value",e);DlhSoft.Controls.DatePicker&&p.addEventListener("focus",function(){var b=DlhSoft.Controls.DatePicker.get(p);if(!b||!b.isOpen){var e=0,d=0;try{e=p.selectionStart;d=p.selectionEnd}catch(c){}b=DlhSoft.Controls.DatePicker.initialize(p, +void 0,{inputStyle:null,defaultTimeOfDay:m,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:j,months:l,daysOfWeek:Va(n),dateTimeFormatter:r,dateTimeParser:s},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{p.selectionStart=e;p.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)== +null?setTimeout(function(){try{p.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);p.dispatchEvent(b)})}},true);o="";typeof f!==c&&!f()&&(o="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");p.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+o+f);typeof g!==c&&!g()&&p.setAttribute("disabled","true");var q=function(){var a=p.value,a=a!=""?k(a):null;b(a)}; +p.addEventListener("change",function(){q()},true);p.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();q()}},true);p.addEventListener("focus",function(){p.style.backgroundColor="White"},true);p.addEventListener("blur",function(){p.style.backgroundColor="Transparent"},true);return p},dateTimePickerInputColumnTemplateBase:function(a,d,e,b,g,f,h,m,j,l,n,o,k){n||(n=["Su","Mo","Tu","We","Th","Fr","Sa"]);var r=o,s=k;if(!o)o=DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter; +if(!k)k=DlhSoft.Controls.GanttChartView.defaultDateTimeParser;var p=a.createElement("input");p.setAttribute("type","text");e=e();typeof e===c?e="":e!=null&&(e=o(e));p.setAttribute("value",e);(DlhSoft.Controls.DateTimePicker||DlhSoft.Controls.DatePicker)&&p.addEventListener("focus",function(){var b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(p);if(!b||!b.isOpen){var e=0,d=0;try{e=p.selectionStart;d=p.selectionEnd}catch(c){}b=(DlhSoft.Controls.DateTimePicker? +DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(p,void 0,{inputStyle:null,defaultTimeOfDay:m,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:j,months:l,daysOfWeek:Va(n),dateTimeFormatter:r,dateTimeParser:s},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{p.selectionStart= +e;p.selectionEnd=d}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{p.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);p.dispatchEvent(b)})}},true);o="";typeof f!==c&&!f()&&(o="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");p.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+o+f);typeof g!==c&& +!g()&&p.setAttribute("disabled","true");var q=function(){var a=p.value,a=a!=""?k(a):null;b(a)};p.addEventListener("change",function(){q()},true);p.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();q()}},true);p.addEventListener("focus",function(){p.style.backgroundColor="White"},true);p.addEventListener("blur",function(){p.style.backgroundColor="Transparent"},true);return p},multiSelectorComboBoxInputColumnTemplateBase:function(a,d,e,b,g,f,h,m){var j= +a.createElement("input");j.setAttribute("type","text");b=b();typeof b===c&&(b="");j.setAttribute("value",b);DlhSoft.Controls.MultiSelectorComboBox&&j.addEventListener("focus",function(){var b=DlhSoft.Controls.MultiSelectorComboBox.get(j);if(!b||!b.isOpen&&b.availableChoices.length>0){var b=e(),d=0,c=0;try{d=j.selectionStart;c=j.selectionEnd}catch(f){}b=DlhSoft.Controls.MultiSelectorComboBox.initialize(j,b,void 0,{inputStyle:null,autoAppendAvailableChoices:false,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0; color: Black; font-size: small; max-height: 188px; overflow-y: auto"}, +"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{j.selectionStart=d;j.selectionEnd=c}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{j.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);j.dispatchEvent(b)})}},true);b="";typeof h!==c&& +!h()&&(b="; display: none");h="";typeof m!==c&&m()&&(h="; font-weight: bold");j.setAttribute("style","background-color: Transparent; width: "+d+"px; border-width: 0px; padding: 0px"+b+h);typeof f!==c&&!f()&&j.setAttribute("disabled","true");j.addEventListener("change",function(){g(j.value)},true);j.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(j.value)}},true);j.addEventListener("focus",function(){j.style.backgroundColor="White"},true);j.addEventListener("blur", +function(){j.style.backgroundColor="Transparent"},true);return j},dateTimeInputColumnTemplateBase:function(a,d,e,b,c,f,h){return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(a,d,function(){var a=e();return a!=null?DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter(a):""},function(a){a=a!=""?DlhSoft.Controls.GanttChartView.defaultDateTimeParser(a):null;b(a)},c,f,h)},getIndexColumnTemplate:function(){return function(a){var d=a.ganttChartView;return DlhSoft.Controls.GanttChartView.textColumnTemplateBase(d.ownerDocument, +function(){return d.getItemIndexString(a)})}},getWbsColumnTemplate:function(a){return function(d){var e=d.ganttChartView;return DlhSoft.Controls.GanttChartView.textColumnTemplateBase(e.ownerDocument,function(){return e.getItemWbsIndexString(d,a)})}},getEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemEffort(b)},function(a){g.setItemEffort(b, +a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getDurationColumnTemplate:function(a,d,e){typeof d=== +c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemDuration(b)},function(a){g.setItemDuration(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone|| +typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getTotalEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemTotalEffort(b)},function(a){g.setItemTotalEffort(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!== +c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getCompletedEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument, +a,function(){return g.getItemCompletedEffort(b)},function(a){g.setItemCompletedEffort(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled=== +c||b.isSummaryEnabled)})}},getTotalCompletedEffortColumnTemplate:function(a,d,e){typeof d===c&&(d=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemTotalCompletedEffort(b)},function(a){g.setItemTotalCompletedEffort(b,a);g.refreshItemPath(b)},d,function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&& +!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getCompletionColumnTemplate:function(a,d){return function(e){var b=e.ganttChartView;return DlhSoft.Controls.GanttChartView.percentInputColumnTemplateBase(b.ownerDocument,a,function(){var a=b.getItemCompletion(e)*100;return Math.round(a*100)/100},function(a){if(typeof e.gridItem!== +c&&typeof e.completedInput!==c){var d=e.completedInput;typeof d.changeEventListener!==c&&d.removeEventListener("change",d.changeEventListener,true);delete e.completedInput}a=parseFloat(a)/100;b.setItemCompletion(e,a);b.refreshItemPath(e)},function(){return!(e.isReadOnly||d||typeof e.ganttChartView!==c&&typeof e.ganttChartView.settings!==c&&(e.ganttChartView.settings.isReadOnly||e.ganttChartView.settings.isGridReadOnly))&&!(e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled))},function(){return!(e.isMilestone|| +typeof e.isBarVisible!==c&&!e.isBarVisible)},function(){return e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled)})}},getCostColumnTemplate:function(a,d){return function(e){var b=e.ganttChartView;return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(b.ownerDocument,a,function(){return b.getItemCost(e)},function(a){b.setItemCost(e,a);b.refreshItemPath(e)},function(){return!(e.isReadOnly||d||typeof e.ganttChartView!==c&&typeof e.ganttChartView.settings!==c&&(e.ganttChartView.settings.isReadOnly|| +e.ganttChartView.settings.isGridReadOnly))},void 0,function(){return e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled)})}},getPredecessorsColumnTemplate:function(a,d,e){return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemPredecessorsString(b,e)},function(a){g.setItemPredecessorsString(b,a,e);g.refreshItemGraph(b)},function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!== +c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getAssignmentSelectorColumnTemplate:function(a,d,e){return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.optionSelectColumnTemplateBase(g.ownerDocument,a,function(){return typeof d==="array"?d:d(b)},function(){return b.assignmentsContent}, +function(a){b.assignmentsContent=a;g.onItemPropertyChanged(b,"assignmentsContent",true,true);g.refreshItem(b)},function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getBaselineStartColumnTemplate:function(a,d,e,b,g,f, +h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.baselineStart},function(a){a!=null?j.baselineStart=a:delete j.baselineStart;l.onItemPropertyChanged(j,"baselineStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly|| +o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h)}},getBaselineFinishColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase: +DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.baselineFinish},function(a){a!=null?j.baselineFinish=a:delete j.baselineFinish;l.onItemPropertyChanged(j,"baselineFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))}, +function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h)}},getMinStartColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument, +a,function(){return j.minStart},function(a){a!=null?j.minStart=a:delete j.minStart;l.onItemPropertyChanged(j,"minStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&& +(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h)}},getMaxStartColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.maxStart},function(a){a!=null?j.maxStart=a:delete j.maxStart; +l.onItemPropertyChanged(j,"maxStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h)}},getMinFinishColumnTemplate:function(a, +d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l=j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.minFinish},function(a){a!=null?j.minFinish=a:delete j.minFinish;l.onItemPropertyChanged(j,"minFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly|| +o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h)}},getMaxFinishColumnTemplate:function(a,d,e,b,g,f,h,o){typeof d===c&&(d=true);typeof e===c&&(e=true);return function(j){var l= +j.ganttChartView;return(d?e?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.maxFinish},function(a){a!=null?j.maxFinish=a:delete j.maxFinish;l.onItemPropertyChanged(j,"maxFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||o||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&& +(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h)}},getIconColumnTemplate:function(a,d,e,b,g,f,h,o,j){if(typeof a==="string")var l=a,a=function(){return l};typeof b===c||b==false?b=function(){return false}:b==true&& +(b=function(){return true});return function(l){var k=l.ganttChartView,r=k.ownerDocument.createElement("img");r.setAttribute("src",a(l));typeof d!==c&&r.setAttribute("class",d);typeof e!==c&&r.setAttribute("style",e);if(!k.settings.isReadOnly&&!k.settings.isGridReadOnly&&b(l)){r.style.cursor="move";Pc(r,l,k.items,k,k.settings,g,f,h,o,j)}return r}},getOutputDate:convertToLocalTimezone,getInputDate:convertToUTC}}()); +void 0==DlhSoft.Controls.ScheduleChartView&&(DlhSoft.Controls.ScheduleChartView=function(){var c=function(c,k,s,q){var v=["DlhSoft.Controls","ScheduleChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[v[5]][v[4]](c,v[0],v[1],v[2],v[3],q,s);c.isScheduleChartInitializing=true;for(var q=k,k=[],C=v=0,r=0;r=k.chartHeaderContainer.clientHeight+k.chartContentContainer.clientHeight-24){s=k.chartContentContainer.scrollTop;k.chartContentContainer.scrollTop=k.chartContentContainer.scrollTop+20;if(typeof k.isDuringVerticalScrolling==="undefined"){k.isDuringVerticalScrolling=true;setTimeout(function(){q=k.chartContentContainer.scrollTop- +s;k.draggingInitialThumbPosition=k.draggingInitialThumbPosition+q;delete k.isDuringVerticalScrolling},0)}}}},Z=function(c,k,s,q){var v=q.indexOf(c);if(!(v<0||k<0||k==v||k>=q.length)){q.splice(v,1);q.splice(k,0,c);N(s);typeof s.settings.itemMoveHandler!=="undefined"&&s.settings.itemMoveHandler(c,v,k)}},sa=function(c,k,s,q){for(var v=0;vs.length-r)){var v=[],x;for(x=k;x=s.length-1||Z(k,r+1,c,s)}},x=function(c,k){c.items=k;c.refresh=function(){N(c)}};return{initialize:c,refresh:N,getDefaultColumns:aa,getDefaultScales:DlhSoft.Controls.GanttChartView.getDefaultScales,getDefaultStyleDefinitionTemplate:DlhSoft.Controls.GanttChartView.getDefaultStyleDefinitionTemplate, +getDefaultStandardTaskTemplate:DlhSoft.Controls.GanttChartView.getDefaultStandardTaskTemplate,getDefaultMilestoneTaskTemplate:DlhSoft.Controls.GanttChartView.getDefaultMilestoneTaskTemplate,getDefaultItemTemplate:DlhSoft.Controls.GanttChartView.getDefaultItemTemplate,getDefaultAssignmentsTemplate:DlhSoft.Controls.GanttChartView.getDefaultAssignmentsTemplate,initializeTaskDraggingThumbs:DlhSoft.Controls.GanttChartView.initializeTaskDraggingThumbs,initializeDependencyDraggingThumb:DlhSoft.Controls.GanttChartView.initializeDependencyDraggingThumb, +initializeAssignmentDraggingThumb:function(c,k,s,q,v){s.scheduleChartView.initializeAssignmentDraggingThumb(c,k,s,q,v)},getWorkingTime:DlhSoft.Controls.GanttChartView.getWorkingTime,getEffort:DlhSoft.Controls.GanttChartView.getEffort,getFinish:DlhSoft.Controls.GanttChartView.getFinish,getStart:DlhSoft.Controls.GanttChartView.getStart,getCompletion:DlhSoft.Controls.GanttChartView.getCompletion,getCompletedFinish:DlhSoft.Controls.GanttChartView.getCompletedFinish,textColumnTemplateBase:DlhSoft.Controls.GanttChartView.textColumnTemplateBase, +textInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase,getOutputDate:DlhSoft.Controls.GanttChartView.getOutputDate,getInputDate:DlhSoft.Controls.GanttChartView.getInputDate}}()); +void 0==DlhSoft.Controls.LoadChartView&&(DlhSoft.Controls.LoadChartView=function(){var c=function(c,o,k,s){var q=["DlhSoft.Controls","LoadChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[q[5]][q[4]](c,q[0],q[1],q[2],q[3],s,k);c.isLoadChartInitializing=true;for(var s=o,o=[],v=q=0,C=0;C0;)c.chartItemArea.removeChild(c.chartItemArea.childNodes[r]);r=c.chartItemArea;var z=q.getChartPosition(c.start,v),q=Math.max(q.getChartPosition(c.finish,v),z+4),x=x.createElementNS("http://www.w3.org/2000/svg","rect"),A=typeof c.units!=="undefined"?c.units:1,B=Math.min(A,v.maxDisplayedUnits)/v.maxDisplayedUnits*v.barHeight;x.setAttribute("x",z);x.setAttribute("y",v.barMargin+(v.barHeight-B));x.setAttribute("width",Math.max(0,q-z-1));x.setAttribute("height", +B);z=A==1?v.normalAllocationBarClass:A<1?v.underAllocationBarClass:v.overAllocationBarClass;if(typeof c.allocationBarClass!=="undefined")z=c.allocationBarClass;if(typeof z!=="undefined")x.setAttribute("class",z);else{v=A==1?v.normalAllocationBarStyle:A<1?v.underAllocationBarStyle:v.overAllocationBarStyle;if(typeof c.allocationBarStyle!=="undefined")v=c.allocationBarStyle;typeof v!=="undefined"&&x.setAttribute("style",v)}r.appendChild(x);return r}},L=function(c,o,k,s){var q=s.indexOf(c);if(!(q<0|| +o<0||o==q||o>=s.length)){s.splice(q,1);s.splice(o,0,c);N(k);typeof k.settings.itemMoveHandler!=="undefined"&&k.settings.itemMoveHandler(c,q,o)}},Q=function(c,o){for(var k in o)k.indexOf("custom")!=0&&k.indexOf("description")!=0||typeof c[k]==="undefined"&&(c[k]=o[k])},V=function(c,o,k,s,q,v,C,r,z,A,B,I,M,K,L,N,E){var U,T=[],G;if(typeof s!=="undefined")for(U=0;UA)||typeof B.displayRowIndex==="undefined"&&(Z++A+1))){E={content:B.content,indentation:B.indentation,start:B.start,finish:B.finish,units:B.units,isBarVisible:B.isBarVisible, +isRelativeToTimezone:B.isRelativeToTimezone,"class":B["class"],style:B.style,barClass:B.barClass,barStyle:B.barStyle,isSummaryEnabled:B.isSummaryEnabled,isParentSummarizationEnabled:B.isParentSummarizationEnabled,isHidden:B.isHidden,isExported:true,tag:B};if(typeof B.displayRowIndex!=="undefined")E.displayRowIndex=B.displayRowIndex-z;Q(E,B);c.push(E);B.exportItem=E}}var Ja=P.createElement("p");Ja.innerHTML=typeof o!=="undefined"?o:"";P.body.appendChild(Ja);var ca=P.createElement("div");ca.setAttribute("style", +"width: "+V+"px");try{DlhSoft.Controls.LoadChartView.initialize(ca,c,q,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(Ha){}setTimeout(function(){aa&&P.body.setAttribute("style","margin: 0px");var c=P.createElement("div");c.appendChild(ca);P.body.replaceChild(c,Ja);if(M){c.setAttribute("style","width: "+ca.offsetHeight+"px; height: "+V+"px; overflow: hidden");c=Math.round((ca.offsetWidth-ca.offsetHeight)/ +2);ca.setAttribute("style","width: "+V+"px; transform: rotate(90deg) translateX("+c+"px) translateY("+c+"px); -webkit-transform: rotate(90deg) translateX("+c+"px) translateY("+c+"px)")}P.close();if(typeof W!==void 0){W.focus();if(typeof I!=="undefined"&&I){W.print();(typeof K==="undefined"||K)&&setTimeout(function(){W.close()})}}},0)},Z=function(c,o,k,s){for(var q=0;qk.length-q)){var s=[],A;for(A=o;A=k.length-1||L(o,q+1,c,k)}},sa=function(c,o,k){c.items=o;c.refresh=function(){N(c)};c.exportContent=function(s,q){typeof s==="undefined"&&(s={});V(s.title,s.preparingMessage,s.isGridVisible,s.columnIndexes,s.timelineStart,s.timelineFinish,s.isRelativeToTimezone, +s.hourWidth,s.startRowIndex,s.endRowIndex,q,false,s.rotate,false,c,o,k)};c.print=function(s){typeof s==="undefined"&&(s={});V(s.title,s.preparingMessage,s.isGridVisible,s.columnIndexes,s.timelineStart,s.timelineFinish,s.isRelativeToTimezone,s.hourWidth,s.startRowIndex,s.endRowIndex,null,true,s.rotate,s.autoClose,c,o,k)}};return{initialize:c,refresh:N,getDefaultColumns:aa,getDefaultScales:DlhSoft.Controls.GanttChartView.getDefaultScales,getDefaultAllocationTemplate:I,getDefaultItemTemplate:DlhSoft.Controls.GanttChartView.getDefaultItemTemplate, +getWorkingTime:DlhSoft.Controls.GanttChartView.getWorkingTime,textColumnTemplateBase:DlhSoft.Controls.GanttChartView.textColumnTemplateBase,textInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase,getOutputDate:DlhSoft.Controls.GanttChartView.getOutputDate,getInputDate:DlhSoft.Controls.GanttChartView.getInputDate}}()); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.React.Components.jsx b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.React.Components.jsx new file mode 100644 index 000000000..c4d92b593 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.React.Components.jsx @@ -0,0 +1,53 @@ +import React from 'react'; +const DlhSoft = window.DlhSoft; + +export var GanttChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.GanttChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); + +export var ScheduleChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.ScheduleChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); + +export var LoadChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.LoadChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Vue.Components.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Vue.Components.js new file mode 100644 index 000000000..1bc21f052 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.GanttChart.Vue.Components.js @@ -0,0 +1,44 @@ +Vue.component('gantt-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.GanttChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); + +Vue.component('schedule-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.ScheduleChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); + +Vue.component('load-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.LoadChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Angular.Components.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Angular.Components.ts new file mode 100644 index 000000000..2b82c0a26 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Angular.Components.ts @@ -0,0 +1,63 @@ +import { Component, OnInit, ElementRef, Input } from '@angular/core'; +import PertChartItem = DlhSoft.Controls.Pert.PertChartView.Item; +import PertChartSettings = DlhSoft.Controls.Pert.PertChartView.Settings; +import NetworkDiagramItem = DlhSoft.Controls.Pert.NetworkDiagramView.Item; +import NetworkDiagramSettings = DlhSoft.Controls.Pert.NetworkDiagramView.Settings; + +@Component({ + selector: 'pertchartview', + template: '
' +}) +export class PertChartView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: PertChartItem[] = []; + @Input() settings: PertChartSettings = {}; + @Input() license: string; + @Input() change: (item: PertChartItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.PertChartView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } +} + +@Component({ + selector: 'networkdiagramview', + template: '
' + }) + export class NetworkDiagramView implements OnInit { + rootElement: HTMLElement; + @Input() style: string = ""; + @Input() items: NetworkDiagramItem[] = []; + @Input() settings: NetworkDiagramSettings = {}; + @Input() license: string; + @Input() change: (item: NetworkDiagramItem, propertyName: string, isDirect: boolean, isFinal: boolean) => void; + constructor(elementRef: ElementRef) { + this.rootElement = elementRef.nativeElement; + } + ngOnInit() { + var element = this.rootElement.firstChild; + element.setAttribute('style', this.style); + var changeHandler = this.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.NetworkDiagramView.initialize(element, this.items, this.settings, this.license); + if (this.change) { + this.settings.itemPropertyChangeHandler = (item, propertyName, isDirect, isFinal) => { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + this.change(item, propertyName, isDirect, isFinal); + } + } + } + } diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Angular.Directives.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Angular.Directives.js new file mode 100644 index 000000000..74e85667a --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Angular.Directives.js @@ -0,0 +1,59 @@ +// Version 1.0.0.0. +var module = angular.module("DlhSoft.ProjectData.PertChart.Directives", []); +dsDefinePDPCDirective(module, "PertChart"); +dsDefinePDPCDirective(module, "NetworkDiagram"); +function dsDefinePDPCDirective(module, directiveName, controlName) { + module.directive("ds" + directiveName, function () { + return { + restrict: "EAC", + replace: true, + transclude: true, + scope: { + items: "=", + settings: "=", + change: "=", + autoRefresh: "@", + license: "=" + }, + template: "
", + link: function (scope, element) { + var controlElement = element[0]; + var initialization = function () { + var items = scope.items; + if (!items) + items = []; + var settings = scope.settings; + if (!settings) + settings = {}; + var license = scope.license; + var changeHandler = settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert[controlName ? controlName : directiveName + "View"].initialize(controlElement, items, settings, license); + if (scope.change) { + settings.itemPropertyChangeHandler = function (item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + scope.change(item, propertyName, isDirect, isFinal); + } + } + } + initialization(); + var isWaitingToRefresh = false; + var refresh = function () { + if (isWaitingToRefresh) + return; + isWaitingToRefresh = true; + setTimeout(function () { + initialization(); + isWaitingToRefresh = false; + }); + } + setTimeout(function () { + scope.$watch("items", refresh); + scope.$watch("settings", refresh); + if (scope.autoRefresh == "true") + scope.$watch(refresh); + }, 0); + } + }; + }); +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.d.ts new file mode 100644 index 000000000..74174483f --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.d.ts @@ -0,0 +1,351 @@ +/* Assembly: DlhSoft.ProjectData.PertChart.HTML.Controls, + Company: DlhSoft, + Product: Project Data Modern Library, + Version: 5.3.1.0, + Copyright: Copyright © 2012-2016 DlhSoft, + Title: Project Data PERT Chart HTML Controls, + Description: Project Data PERT Chart related HTML client components */ + +/* +/// +*/ + +declare module DlhSoft.Controls.Pert { + /** Represents a control that presents task event data items using a PERT Chart. */ + module PertChartView { + /** + * Initializes a PertChartView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Task event data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultTaskEventTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultDependencyLineTemplate(items: Item[], settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + function getDefaultPredecessorItemTemplate(settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + + /** Inside task event template functions, sets up task event drag and drop behavior for the non-null SVG element specified to be designed as thumb, considering the specified item and item positioning in the chart. */ + function initializeTaskEventDraggingThumbs(thumb: SVGElement, item: Item, itemLeft: number, itemTop: number): void; + + function defaultTimeSpanFormatter(timeSpan: number): string; + + /** Represents an HTML element that supplementary provides PertChartView component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshItems(): void; refreshItem(item: Item): void; refreshPredecessorItems(item: Item): void; refreshItemGraph(item: Item): void; + + scrollToItem(item: Item): void; scrollToLeft(): void; scrollToTop(): void; scrollToRight(): void; scrollToBottom(): void; + + /** Returns the actual width of the chart area. */ + getChartWidth(): number; + /** Returns the actual height of the chart area. */ + getChartHeight(): number; + + getItemLeft(item: Item): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + isItemCritical(item: Item): boolean; getCriticalItems(): Item[]; + isDependencyCritical(predecessorItem: PredecessorItem): boolean; getCriticalDependencies(): PredecessorItem[]; + + /** Updates the vertical position of start and finish nodes, assuming they are the first and the last items in the collection, to the first or between the first and second row in the view (when there is at least one item with two or more successors in the collection). */ + repositionEnds(): void; + + isInitializing: boolean; isInitialized: boolean; + } + + /** Represents a task event data item and its PERT Chart representation. */ + interface Item { + /** The object that is displayed to represent the task event item in the task event shape tool tips, usually the task event name. */ + content: any; + + /** The object that is displayed to represent the task event item in the task event shape, usually a short task event name or identifier. */ + displayedText: any; + + isShapeVisible?: boolean; + + displayRowIndex?: number; displayColumnIndex?: number; + + shapeClass?: string; shapeStyle?: string; + taskEventTemplate? (item: Item): SVGElement; + template? (item: Item): SVGElement; + + /** The predecessors collection defines predecessor items (objects) representing the tasks displayed in the PERT Chart view as dependency lines. */ + predecessors?: PredecessorItem[]; + } + + /** Represents a depdendency between two task event data items and its PERT Chart representation. */ + interface PredecessorItem { + /** Task event item that precedes the owner of the predecessor item (the item that the current item depends of). */ + item: Item; + + /** The object that is displayed to represent the task item in the dependency line tool tips, usually the task name. */ + content?: any; + + /** The object that is displayed to represent the task item on the dependency line, usually a short task name or identifier. */ + displayedText?: any; + + effort?: number; isEffortVirtual?: boolean; + + dependencyLineClass?: string; dependencyLineStyle?: string; dependencyTextClass?: string; dependencyTextStyle?: string; + template? (item: Item, predecessorItem: PredecessorItem): SVGElement; + } + + /** Represents settings for a PertChartView component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + /** Indicates whether the user can change the canvas positions of task event items in the control by drag and drop operations (by default it is set to true). */ + canUserRearrangeItems?: boolean; + + /** Indicates whether the task event item shapes are snapping to row and column based guidelines in the control during drag and drop based rearrange operations (by default it is set to true). */ + snapRearrangedItemsToGuidelines?: boolean; + + chartMargin?: number; + itemWidth?: number; itemHeight?: number; + + /** The aspect ratio of the chart, indicating the rate between horizontal and vertical item layout positioning. */ + aspectRatio?: number; + + shapeWidth?: number; shapeHeight?: number; + dependencyTextBlockWidth?: number; + + styleDefinitionTemplate? (): SVGDefsElement; + shapeClass?: string; shapeStyle?: string; dependencyTextClass?: string; dependencyTextStyle?: string; + temporaryThumbClass?: string; temporaryThumbStyle?: string; + dependencyLineClass?: string; dependencyLineStyle?: string; + + taskEventTemplate? (item: Item): SVGElement; + extraTaskEventTemplate? (item: Item): SVGElement; + + isTaskEventToolTipVisible?: boolean; + itemTemplate? (item: Item): SVGElement; + + dependencyLineTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + isDependencyToolTipVisible?: boolean; + predecessorItemTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + /** Converts time span values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + timeSpanFormatter? (timeSpan: number): string; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + mouseHandler? (eventName: string, item: Item, button: number, clickCount: number, e: MouseEvent): void; + mouseMoveHandler? (item: Item): void; + mouseDownHandler? (item: Item, button: number): void; + itemClickHandler? (item: Item): void; + itemDoubleClickHandler? (item: Item): void; + dependencyLineClickHandler? (predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + dependencyLineDoubleClickHandler?(predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + } + + /** Represents export settings for a PertChartView component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + rotate?: boolean; + autoClose?: boolean; + } + } + + /** Represents a control that presents task data items using a Network Diagram. */ + module NetworkDiagramView { + /** + * Initializes a NetworkDiagramView component instance. + * @param element The HTMLElement that would host the user interface of the component. + * @param items Task data objects to be managed and presented by the component. + * @param settings Configuration settings for the component behavior and appearance. + */ + function initialize(element: HTMLElement, items: Item[], settings?: Settings, license?: String): Element; + + function getDefaultStyleDefinitionTemplate(controlElement: Element, settings: Settings): () => SVGDefsElement; + function getDefaultTaskTemplate(items: Item[], controlElement: Element, settings: Settings): (item: Item) => SVGElement; + function getDefaultItemTemplate(settings: Settings): (item: Item) => SVGElement; + function getDefaultDependencyLineTemplate(items: Item[], settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + function getDefaultPredecessorItemTemplate(settings: Settings): (item: Item, predecessorItem: PredecessorItem) => SVGElement; + + /** Inside task template functions, sets up task drag and drop behavior for the non-null SVG element specified to be designed as thumb, considering the specified item and item positioning in the diagram. */ + function initializeTaskDraggingThumbs(thumb: SVGElement, item: Item, itemLeft: number, itemTop: number): void; + + function defaultDateTimeFormatter(date: Date): string; + function defaultTimeSpanFormatter(timeSpan: number): string; + + /** Prepares the specified date values to be used for component method input, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getInputDate(date: Date): Date; + /** Prepares the specified date values to be used for component method result or field output, considering that after initialization the component uses UTC date and time values internally; this method may also be called using a component instance object. */ + function getOutputDate(date: Date): Date; + + /** Represents an HTML element that supplementary provides NetworkDiagramView component services. */ + interface Element extends HTMLElement { + items: Item[]; + settings: Settings; + + /** Updates the user interface considering all external item and settings changes. */ + refresh(): void; + + refreshItems(): void; refreshItem(item: Item): void; refreshPredecessorItems(item: Item): void; refreshItemGraph(item: Item): void; + + scrollToItem(item: Item): void; scrollToLeft(): void; scrollToTop(): void; scrollToRight(): void; scrollToBottom(): void; + + /** Returns the actual width of the diagram area. */ + getChartWidth(): number; + /** Returns the actual height of the diagram area. */ + getChartHeight(): number; + + getItemLeft(item: Item): number; + getItemTop(item: Item): number; + + /** Calls itemPropertyChangeHandler function specified within the settings collection using the specified item, property name, and Boolean indicators for direct user actions and completed actions as arguments. */ + onItemPropertyChanged(item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + /** Exports the content to the specified output document. */ + exportContent(exportSettings: ExportSettings, output: HTMLDocument): void; + /** Exports the content to the document of the specified output window. */ + exportContent(exportSettings: ExportSettings, output: Window): void; + /** Exports the content to the specified target or using a temporary document and window. */ + exportContent(exportSettings?: ExportSettings, output?: string): void; + /** Prints the content using a temporary document and window. */ + print(exportSettings?: ExportSettings): void; + + isItemCritical(item: Item): boolean; getCriticalItems(): Item[]; + isDependencyCritical(predecessorItem: PredecessorItem): boolean; getCriticalDependencies(): PredecessorItem[]; + + /** Updates the vertical position of start and finish nodes, assuming they are the first and the last items in the collection, to the first or between the first and second row in the view (when there is at least one item with two or more successors in the collection). */ + repositionEnds(): void; + + isInitializing: boolean; isInitialized: boolean; + } + + /** Represents a task data item and its Network Diagram representation. */ + interface Item { + /** The object that is displayed to represent the task item in the task shape tool tips, usually the full task name and path. */ + content: any; + + /** The object that is displayed to represent the task item in the task shape, usually a short task name or identifier. */ + displayedText: any; + + effort: number; earlyStart: Date; earlyFinish: Date; lateStart: Date; lateFinish: Date; + + /** A milestone task is displayed in the Network Diagram view using a supplemental task shape template. */ + isMilestone?: boolean; + + slack: number; + + isRelativeToTimezone?: boolean; + + isShapeVisible?: boolean; + + displayRowIndex?: number; displayColumnIndex?: number; + + shapeClass?: string; milestoneClass?: string; shapeStyle?: string; milestoneStyle?: string; + taskTemplate? (item: Item): SVGElement; + template? (item: Item): SVGElement; + + /** The predecessors collection defines predecessor items (objects) referring the task items that the current item depends of, and having the relations displayed in the Network Diagram view as dependency lines. */ + predecessors?: PredecessorItem[]; + } + + /** Represents a depdendency between two task data items and its Network Diagram representation. */ + interface PredecessorItem { + /** Task item that precedes the owner of the predecessor item (the item that the current item depends of). */ + item: Item; + + dependencyLineClass?: string; dependencyLineStyle?: string; + template? (item: Item, predecessorItem: PredecessorItem): SVGElement; + } + + /** Represents settings for a NetworkDiagramView component. */ + interface Settings { + /** Name of the target to generically apply to the control; Standard, and Phone targets are supported; by default it is Standard. */ + target?: string; + + /** Name of the theme to generically apply to the control; Modern, ModernBordered, and Aero themes are supported; by default it is Modern. */ + theme?: string; + + border?: string; + containerClass?: string; containerStyle?: string; + + /** Indicates whether the user can change the canvas positions of task items in the control by drag and drop operations (by default it is set to true). */ + canUserRearrangeItems?: boolean; + + /** Indicates whether the task item shapes are snapping to row and column based guidelines in the control during drag and drop based rearrange operations (by default it is set to true). */ + snapRearrangedItemsToGuidelines?: boolean; + + diagramMargin?: number; + itemWidth?: number; itemHeight?: number; + + /** The aspect ratio of the diagram, indicating the rate between horizontal and vertical item layout positioning. */ + aspectRatio?: number; + + shapeWidth?: number; shapeHeight?: number; + minDependencyLineLength?: number; + + styleDefinitionTemplate? (): SVGDefsElement; + shapeClass?: string; milestoneClass?: string; shapeStyle?: string; milestoneStyle?: string; + temporaryThumbClass?: string; temporaryThumbStyle?: string; + dependencyLineClass?: string; dependencyLineStyle?: string; + + taskTemplate? (item: Item): SVGElement; + extraTaskTemplate? (item: Item): SVGElement; + + isTaskToolTipVisible?: boolean; + itemTemplate? (item: Item): SVGElement; + + dependencyLineTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + isDependencyToolTipVisible?: boolean; + predecessorItemTemplate? (item: Item, predecessorItem: PredecessorItem): SVGElement; + + /** Converts date and time values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + dateTimeFormatter? (dateTime: Date): string; + + /** Converts time span values to text values whenever needed within the control; the function may be provided by the developer for further customization and/or localization purposes. */ + timeSpanFormatter? (timeSpan: number): string; + + /** Function called whenever item properties change within the control, providing the changed item, relevant property name, and Boolean values indicating whether this change was directly triggered by the user, and whether this is the final change in a periodic operation such as a drag and drop action, specified as parameters; a custom function may be provided by the developer in order to receive notifications whenever data changes occur within the control. */ + itemPropertyChangeHandler? (item: Item, propertyName: string, isDirect: boolean, isFinal: boolean): void; + + mouseHandler? (eventName: string, item: Item, button: number, clickCount: number, e: MouseEvent): void; + mouseMoveHandler? (item: Item): void; + mouseDownHandler? (item: Item, button: number): void; + itemClickHandler? (item: Item): void; + itemDoubleClickHandler? (item: Item): void; + dependencyLineClickHandler? (predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + dependencyLineDoubleClickHandler?(predecessorItem: PredecessorItem, targetItem: Item, e: MouseEvent): void; + } + + /** Represents export settings for a NetworkDiagramView component. */ + interface ExportSettings { + title?: string; preparingMessage?: string; + rotate?: boolean; + autoClose?: boolean; + } + } +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.js new file mode 100644 index 000000000..2ef8f5e8b --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.HTML.Controls.js @@ -0,0 +1,150 @@ +var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.PertChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.17.0",copyright:"Copyright \u00a9 2012-2020 DlhSoft",title:"Project Data PERT Chart HTML Controls",description:"Project Data PERT Chart related HTML client components"}); +DlhSoft.buildReleaseDate=function(L,M,O){L=new Date(L,M-1,O);return L>DlhSoft.buildReleaseDate?L:DlhSoft.buildReleaseDate}(2020,11,25);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); +void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var L=_0x5c25[1],M=_0x5c25[2],O=[],T=[],U=_0x5c25[3],Z=function(I,D){if(typeof I!==M||typeof D!==M)return!1;if(D==U)return!0;var J=D[_0x5c25[11]](_0x5c25[10]);if(0<=J){var w=D[_0x5c25[12]](0,J),y,C=w[_0x5c25[11]](_0x5c25[10]);if(0<=C)try{y=new Date(parseInt(w[_0x5c25[12]](C+1)))}catch(x){}typeof y===L&&(y=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>y)return!1;w=w+_0x5c25[10]+I;for(i=y=0;iy&&(y=Math[_0x5c25[15]](2,32)-y);w=y.toString(16)[_0x5c25[16]]();J=D[_0x5c25[12]](J+1);if(w==J)return!0}return!1},P=function(I,D,J,w,y){var C=_0x5c25[17],x=_0x5c25[18],K=typeof ComponentSource===L||!ComponentSource?x+_0x5c25[19]+w+_0x5c25[20]+y:_0x5c25[21],E=w+_0x5c25[22]+y+_0x5c25[23],G=_0x5c25[24],F=_0x5c25[25],H=_0x5c25[26];setTimeout(function(){var A=I[_0x5c25[27]],y=A[_0x5c25[29]](_0x5c25[28]);y[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var w=A[_0x5c25[29]](_0x5c25[28]);w[_0x5c25[32]](_0x5c25[30], +_0x5c25[33]);var B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);w[_0x5c25[35]](B);B[_0x5c25[35]](A[_0x5c25[36]](C));w[_0x5c25[35]](A[_0x5c25[36]](G+_0x5c25[10]));B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);B[_0x5c25[35]](A[_0x5c25[36]](D));w[_0x5c25[35]](B);w[_0x5c25[35]](A[_0x5c25[36]](F+_0x5c25[10]));B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);B[_0x5c25[35]](A[_0x5c25[36]](E));w[_0x5c25[35]](B);w[_0x5c25[35]](A[_0x5c25[36]](H+ +_0x5c25[10]));B=A[_0x5c25[29]](_0x5c25[28]);B[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var x=A[_0x5c25[29]](_0x5c25[39]);x[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);x[_0x5c25[32]](_0x5c25[41],K);x[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);x[_0x5c25[35]](A[_0x5c25[36]](_0x5c25[44]));B[_0x5c25[35]](x);x=A[_0x5c25[29]](_0x5c25[39]);x[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);x[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);x[_0x5c25[35]](A[_0x5c25[36]](_0x5c25[47]));x[_0x5c25[50]](_0x5c25[48],function(){I[_0x5c25[49]](y);T[_0x5c25[7]](J)}, +!1);B[_0x5c25[35]](x);w[_0x5c25[35]](B);y[_0x5c25[35]](w);I[_0x5c25[35]](y)},0);setTimeout(function(){alert(C+_0x5c25[51]+G+_0x5c25[52]+D+_0x5c25[51]+F+_0x5c25[53]+E+_0x5c25[51]+H+_0x5c25[4])},6E5)};return{setLicense:function(I,D){O[_0x5c25[7]]({type:I,content:D})},validate:function(I,D,J,w,y,C,x){for(var D=D+_0x5c25[4]+J,K=0;K0?a.insertBefore(h,a.childNodes[0]):a.appendChild(h)}catch(c){}},0)};h.addEventListener("mousedown",c,true);l.addEventListener("mouseup",c,true);s.appendChild(h);s.chartArea=h;var u;setTimeout(function(){u=b.clientHeight},0);typeof b.heightUpdateTimer!=="undefined"&&clearInterval(b.heightUpdateTimer); +b.heightUpdateTimer=setInterval(function(){try{if(!(b.clientHeight<=0)){var a=b.clientHeight;if(a!=u){var h=J(b,f,d);g.style.height=h;u=a}}}catch(c){try{clearInterval(b.heightUpdateTimer)}catch(l){}}},100);var k=function(a,h,c,g){var b;if(d.mouseHandler||d.mouseMoveHandler&&g=="mousemove"||d.mouseDownHandler&&g=="mousedown"||d.clickHandler&&g=="click"||d.doubleClickHandler&&g=="dblclick"){var j=a.which;!j&&a.button&&(a.button&1?j=1:a.button&4?j=2:a.button&2&&(j=3));b=c.getBoundingClientRect();var e= +l.body,s=l.documentElement,c=b.left+(window.pageXOffset||s.scrollLeft||e.scrollLeft)-(s.clientLeft||e.clientLeft||0);b=Math.round(b.top+(window.pageYOffset||s.scrollTop||e.scrollTop)-(s.clientTop||e.clientTop||0));c=Math.round(c);c=a.pageX-c;b=a.pageY-b;for(e=0;e=k&&c=u&&b=0&&h0?R(h):e.maxRowIndex!=null?e.maxRowIndex+1:0;l=l=void 0;if(typeof d.displayedColumnIndex==="undefined"){l=P(e.positionedItems,h);l=l.length>0?R(l)+1:0;c=a!=null?P(a,h):null;if(c!=null&&c.length>0){g=null;for(j=0;j0?R(a)+1:0}for(d.actualColumnIndex=l;D(e.positionedItems, +h,l);)h++}else for(;;h++){l=P(e.positionedItems,h);l=l.length>0?R(l)+1:0;if(l<=d.actualColumnIndex)break}d.actualRowIndex=h}else if(typeof d.displayedColumnIndex==="undefined"){a=I(e.positionedItems);d.actualColumnIndex=a.length>0?R(a)+1:0}e.positionedItems.push(d);if(e.maxRowIndex==null||d.actualRowIndex>e.maxRowIndex)e.maxRowIndex=d.actualRowIndex}},P=function(b,f){for(var d=[],e=0;e0?"auto":d.itemHeight+"px";else{var a=b.clientHeight-2;a<0&&(a=0);e=a+"px";if(a0?"auto":d.itemHeight+"px"}b.isContentHeightInitialized= +true}return e},w=function(b,f){var d=b.createElement("span");d.innerHTML=f;return d},y=function(b){return Math.ceil(b/36E5*1E4/100)/100+"h"},C=function(b,f){for(var d=0,e=0;e0)for(var l=0;l0){d= +true;for(e=0;e0;)b.removeChild(b.childNodes[e]);if(typeof f.isShapeVisible==="undefined"||f.isShapeVisible){e=d.taskEventTemplate;if(typeof f.taskEventTemplate!=="undefined")e=f.taskEventTemplate;e=e(f);b.appendChild(e);if(typeof d.internalExtraTaskTemplate!=="undefined"){var a=d.internalExtraTaskTemplate(f);a!=null&&b.appendChild(a)}if(typeof d.extraTaskEventTemplate!=="undefined"){a=d.extraTaskEventTemplate(f);a!=null&&b.appendChild(a)}if(d.isTaskEventToolTipVisible){a= +d.itemTemplate;if(typeof f.template!=="undefined")a=f.template;e.appendChild(a(f))}if(typeof f.predecessors!=="undefined")for(e=0;e0;)e.chartItemArea.removeChild(e.chartItemArea.childNodes[g]);g=e.chartItemArea;var j=(h.itemWidth-h.shapeWidth)/2,s=j+h.shapeWidth,u=(h.itemHeight-h.shapeHeight)/2,k=u+h.shapeHeight,p=h.shapeHeight,m,r=c.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("x",j);r.setAttribute("y",u);r.setAttribute("width",Math.max(0,s-j-1));r.setAttribute("height",Math.max(0,k-u-1));r.setAttribute("rx",h.shapeWidth/10);r.setAttribute("ry",h.shapeHeight/ +10);m=h.shapeClass;if(typeof e.shapeClass!=="undefined")m=e.shapeClass;if(typeof m!=="undefined")r.setAttribute("class",m);else{m=h.shapeStyle;if(typeof e.shapeStyle!=="undefined")m=e.shapeStyle;typeof m!=="undefined"&&r.setAttribute("style",m)}g.appendChild(r);r=c.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("x",(j+s)/2);r.setAttribute("y",k-p*1.5/8-6);r.setAttribute("style","font-weight: bold; text-anchor: middle");p=e.displayedText;typeof p==="undefined"&&(p="");r.appendChild(c.createTextNode(p)); +g.appendChild(r);if(h.canUserRearrangeItems){c=c.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("x",j);c.setAttribute("y",u);c.setAttribute("width",Math.max(0,s-j-1));c.setAttribute("height",Math.max(0,k-u-1));c.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");g.appendChild(c);ca(c,e,l,E(e,h),G(e,h),a,h)}return g}},ba=function(b,f){return function(b,e){var a=b.pertChartView,h=typeof f!=="undefined"?f:a.settings,a=a.ownerDocument,l=a.createElementNS("http://www.w3.org/2000/svg", +"g"),c=void 0,g=void 0,j,s="M ",c=E(b,h)-2,g=G(b,h)-2,u=E(e.item,h);j=G(e.item,h);var k=E(b,h),p=G(b,h),m=Math.abs(k-u),r=Math.abs(p-j),t=h.shapeWidth+2,n=h.shapeHeight+2,q=t/2,v=n/2,o=Math.max(t,n),r=r=k?u:k))/2+q-c;g=((j<=p?j:p)+(j>=p?j:p))/2+v-g;j=s;s=a.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",j);typeof h.dependencyLineZoneClass!=="undefined"&&s.setAttribute("class",h.dependencyLineZoneClass);typeof h.dependencyLineZoneStyle!=="undefined"&&s.setAttribute("style",h.dependencyLineZoneStyle);l.appendChild(s);s=a.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",j);if(typeof e.isEffortVirtual!=="undefined"?!e.isEffortVirtual:typeof e.effort!== +"undefined"&&e.effort>0){j=h.dependencyLineClass;if(typeof e.dependencyLineClass!=="undefined")j=e.dependencyLineClass;typeof j!=="undefined"&&s.setAttribute("class",j);j=h.dependencyLineStyle;if(typeof e.dependencyLineStyle!=="undefined")j=e.dependencyLineStyle}else{j=h.virtualEffortDependencyLineClass;if(typeof e.virtualEffortDependencyLineClass!=="undefined")j=e.virtualEffortDependencyLineClass;typeof j!=="undefined"&&s.setAttribute("class",j);j=h.virtualEffortDependencyLineStyle;if(typeof e.virtualEffortDependencyLineStyle!== +"undefined")j=e.virtualEffortDependencyLineStyle}typeof j!=="undefined"&&s.setAttribute("style",j);l.appendChild(s);s=a.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("x",c);s.setAttribute("y",g-6);g=h.dependencyTextClass;if(typeof e.dependencyTextClass!=="undefined")g=e.dependencyTextClass;typeof g!=="undefined"&&s.setAttribute("class",g);h=h.dependencyTextStyle;if(typeof e.dependencyTextStyle!=="undefined")h=e.dependencyTextStyle;s.setAttribute("style",h);h=e.displayedText; +typeof h==="undefined"&&(h="");s.appendChild(a.createTextNode(h));l.appendChild(s);return l}},la=function(){return function(b,f){var d=b.pertChartView.ownerDocument,e=d.createElementNS("http://www.w3.org/2000/svg","title");e.appendChild(w(d,typeof f.content!=="undefined"?f.content:""));return e}},S=function(b,f,d,e){typeof b.pertChartView!=="undefined"&&b.pertChartView.settings.itemPropertyChangeHandler(b,f,d,e)},ca=function(b,f,d,e,a,h,l){function c(c){h.draggingItem=f;h.dragType="Position";h.style.cursor= +b.style.cursor;h.draggingInitialX=c.clientX;h.draggingInitialY=c.clientY;h.draggingInitialThumbXPosition=e;h.draggingInitialThumbYPosition=a}b.addEventListener("mousedown",function(a){if(a.button==0){c(a);a.preventDefault()}},true);b.addEventListener("touchstart",function(a){c(a.touches[0]);a.preventDefault()},true);if(typeof h.draggableItems==="undefined")h.draggableItems=[];for(var g=false,j=0;j=j.chartContentContainer.clientWidth-24){g=j.chartContentContainer.scrollLeft;j.chartContentContainer.scrollLeft=j.chartContentContainer.scrollLeft+48;g=j.chartContentContainer.scrollLeft-g;if(typeof j.draggingInitialThumbXPosition!=="undefined")j.draggingInitialThumbXPosition=j.draggingInitialThumbXPosition+g}}j=a.clientY;a=h;if(typeof a.draggingItem!=="undefined"){g=a;e=0;if(g.offsetParent){do{e=e+g.offsetTop;g=g.offsetParent}while(g)}j=j-e;if(j<24){j= +a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop-48;j=j-a.chartContentContainer.scrollTop;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition-j}else if(j>=a.chartContentContainer.clientHeight-24){j=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop+48;j=a.chartContentContainer.scrollTop-j;if(typeof a.draggingInitialThumbYPosition!== +"undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition+j}}delete h.draggingItem;h.draggingInitialThumbXPosition+c<0&&(c=-h.draggingInitialThumbXPosition);h.draggingInitialThumbYPosition+b<0&&(b=-h.draggingInitialThumbYPosition);a=f;b=(h.draggingInitialThumbYPosition+b-l.chartMargin)/(l.itemHeight+l.dependencyTextBlockWidth/l.aspectRatio);l.snapRearrangedItemsToGuidelines&&(b=Math.round(b));a.actualRowIndex=b;b=f;c=(h.draggingInitialThumbXPosition+c-l.chartMargin)/(l.itemWidth+ +l.dependencyTextBlockWidth);l.snapRearrangedItemsToGuidelines&&(c=Math.round(c));b.actualColumnIndex=c;S(f,"actualRowIndex",true,false);S(f,"actualColumnIndex",true,false);typeof f.displayedColumnIndex!=="undefined"&&delete f.displayedColumnIndex;typeof f.displayedRowIndex!=="undefined"&&delete f.displayedRowIndex;da(f,d,h.chartContent,l,false);h.draggingItem=f;h.draggingPerformed=true}};h.addEventListener("mousemove",function(a){s(a)},true);h.addEventListener("touchmove",function(a){s(a.touches[0])}, +true);var u=function(){if(!(typeof h.draggingItem==="undefined"||h.draggingItem!=f||h.dragType!="Position")){da(f,d,h.chartContent,l,true);var a=h.draggingItem;delete h.draggingItem;h.style.cursor="default";if(h.draggingPerformed){S(a,"actualColumnIndex",true,true);S(a,"actualRowIndex",true,true);delete h.draggingPerformed}}};document.addEventListener("mouseup",function(a){a.button==0&&u()},true);document.addEventListener("touchend",function(){u()},true);h.draggableItems.push(f)}},da=function(b,f, +d,e,a){var h=b.pertChartView.ownerDocument;if(a){if(typeof d.temporaryRectangle!=="undefined"){h=d.chartArea;h.removeChild(d.temporaryRectangle);delete d.temporaryRectangle}setTimeout(function(){A(b.chartItem,b,e);F(f,b);setTimeout(function(){N(d,f,e,true)},0)})}else{if(typeof d.temporaryRectangle!=="undefined")a=d.temporaryRectangle;else{a=h.createElementNS("http://www.w3.org/2000/svg","rect");a.setAttribute("x",0);a.setAttribute("y",0);a.setAttribute("width",e.shapeWidth);a.setAttribute("height", +e.shapeHeight);a.setAttribute("rx",e.shapeWidth/10);a.setAttribute("ry",e.shapeHeight/10);typeof e.temporaryThumbClass!=="undefined"&&a.setAttribute("class",e.temporaryThumbClass);a.setAttribute("style",e.temporaryThumbStyle);d.temporaryRectangle=a;h=d.chartArea;h.appendChild(a)}var h=E(b,e)+(e.itemWidth-e.shapeWidth)/2,l=G(b,e)+(e.itemHeight-e.shapeHeight)/2;a.setAttribute("transform","translate("+h+", "+l+")");setTimeout(function(){N(d,f,e,false)},0)}},N=function(b,f,d,e){var a=C(f,d),f=x(f,d); +if(e||a>b.clientWidth)b.style.width=a+"px";if(e||f>b.clientHeight)b.style.height=f+"px";b=b.chartArea;e?b.setAttribute("style","width: "+a+"px; height: "+f+"px"):b.setAttribute("style","width: "+Math.max(b.clientWidth,a)+"px; height: "+Math.max(b.clientHeight,f)+"px")},ka=function(b,f){for(var d=b.childNodes.length;d-- >0;)b.removeChild(b.childNodes[d]);b.appendChild(f)},ma=function(b,f){for(var d in f)d.indexOf("custom")!=0&&d.indexOf("description")!=0||typeof b[d]==="undefined"&&(b[d]=f[d])},ea= +function(b,f,d,e,a,h,l,c){var c={isExport:true,canUserRearrangeItems:false,isTaskEventToolTipVisible:false,isDependencyToolTipVisible:false,containerClass:c.containerClass,containerStyle:c.containerStyle,border:c.border,theme:c.theme,itemWidth:c.itemWidth,itemHeight:c.itemHeight,aspectRatio:c.aspectRatio,shapeWidth:c.shapeWidth,shapeHeight:c.shapeHeight,shapeClass:c.shapeClass,shapeStyle:c.shapeStyle,shapeCornerRadius:c.shapeCornerRadius,dependencyTextStyle:c.dependencyTextStyle,dependencyLineClass:c.dependencyLineClass, +dependencyLineStyle:c.dependencyLineStyle,virtualEffortDependencyLineClass:c.virtualEffortDependencyLineClass,virtualEffortDependencyLineStyle:c.virtualEffortDependencyLineStyle,dependencyTextBlockWidth:c.dependencyTextBlockWidth,chartMargin:0,target:c.target,timeSpanFormatter:c.timeSpanFormatter,taskEventTemplate:c.taskEventTemplate,dependencyLineTemplate:c.dependencyLineTemplate},g=C(l,c),j=x(l,c);c.chartWidth=g+"px";c.chartHeight=j+"px";var s=g+2,g=j+2,u,k,p=false;if(d!=null&&typeof d.createElement!== +"undefined")u=d;else{if(d!=null&&typeof d.focus!=="undefined")k=d;else{k=window.open("",d!=null?d:"_blank",typeof e!=="undefined"&&e&&(typeof h==="undefined"||h)?"width=320,height=100,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");p=true}u=k.document;try{for(var m=document.head.getElementsByTagName("link"),d=0;d0;){var a=f[e];if(ga(a).length==0){e=a;break a}}e=null}if(e==null)return[];d=ha(d,e);e=[];for(a=0;a0)l=l+predecessorItem.effort;if(h==null||l>=h){if(h==null||l>h){h=l;e=[]}e.push(predecessorItem)}}}}for(a=0;a0?h.predecessorItem.effort:0);l<0&&(l=0);if(d==null||l>d)d=l}}return d},ga=function(b){for(var f=[],d=b.pertChartView.items,e=0;ef)f=b[d];return f},ja=function(b,f,d){for(var e=0;ea.pertChartView.chartContentContainer.clientWidth-a.pertChartView.settings.itemWidth)a.pertChartView.chartContentContainer.scrollLeft=h-(a.pertChartView.chartContentContainer.clientWidth-a.pertChartView.settings.itemWidth);h=G(a,d);b=h-a.pertChartView.chartContentContainer.scrollTop;if(b<0)a.pertChartView.chartContentContainer.scrollTop= +h;else if(b>a.pertChartView.chartContentContainer.clientHeight-a.pertChartView.settings.itemHeight)a.pertChartView.chartContentContainer.scrollTop=h-(a.pertChartView.chartContentContainer.clientHeight-a.pertChartView.settings.itemHeight)};b.scrollToLeft=function(){b.chartContentContainer.scrollLeft=0};b.scrollToRight=function(){b.chartContentContainer.scrollLeft=b.chartContent.clientWidth};b.scrollToTop=function(){b.chartContentContainer.scrollTop=0};b.scrollToBottom=function(){b.chartContentContainer.scrollTop= +b.chartContent.clientHeight};b.getChartWidth=function(){return C(f,d)};b.getChartHeight=function(){return x(f,d)};b.getItemTop=function(a){return G(a,d)};b.getItemLeft=function(a){return E(a,d)};b.onItemPropertyChanged=S;b.initializeTasEventkDraggingThumbs=function(a,h,l,c){ca(a,h,b.items,l,c,b,b.settings)};b.exportContent=function(a,h){typeof a==="undefined"&&(a={});ea(a.title,a.preparingMessage,h,false,a.rotate,false,f,d)};b.print=function(a){typeof a==="undefined"&&(a={});ea(a.title,a.preparingMessage, +null,true,a.rotate,a.autoClose,f,d)};b.isItemCritical=function(a,h){return na(h,f).indexOf(a)>=0};b.isDependencyCritical=function(a,h){return fa(h,f).indexOf(a)>=0};b.getCriticalItems=function(a){return na(a,f)};b.getCriticalDependencies=function(a){return fa(a,f)};b.repositionEnds=function(){if(f.length!=0){for(var a=false,h=0;h1)break}if(c>1)break}}c>1&&(a=true)}h=f[0];h.displayedRowIndex=a?0.5:0;b=f[f.length-1];b.displayedRowIndex=a?0.5:0;$(h);$(b)}}};return{initialize:L,initializeItems:U,refresh:M,getDefaultStyleDefinitionTemplate:W,getDefaultTaskEventTemplate:aa,getDefaultItemTemplate:X,getDefaultDependencyLineTemplate:ba,getDefaultPredecessorItemTemplate:la,initializeTaskEventDraggingThumbs:function(b,f,d,e){f.pertChartView.initializeTaskEventDraggingThumbs(b,f,d,e)}, +defaultTimeSpanFormatter:y}}()); +void 0==DlhSoft.Controls.Pert.NetworkDiagramView&&(DlhSoft.Controls.Pert.NetworkDiagramView=function(){var L=function(a,h,b,c){var g=["DlhSoft.Controls.Pert","NetworkDiagramView","DlhSoft.ProjectData.PertChart.HTML.Controls","5","validate","Licensing"];DlhSoft[g[5]][g[4]](a,g[0],g[1],g[2],g[3],c,b);a.isInitializing=true;if(typeof a.items!=="undefined")for(c=0;c0?a.insertBefore(h,a.childNodes[0]):a.appendChild(h)}catch(c){}},0)};j.addEventListener("mousedown",f,true);d.addEventListener("mouseup",f,true);m.appendChild(j);m.chartArea=j;var r;setTimeout(function(){r=a.clientHeight},0);typeof a.heightUpdateTimer!=="undefined"&&clearInterval(a.heightUpdateTimer); +a.heightUpdateTimer=setInterval(function(){try{if(!(a.clientHeight<=0)){var c=a.clientHeight;if(c!=r){var g=J(a,h,b);k.style.height=g;r=c}}}catch(j){try{clearInterval(a.heightUpdateTimer)}catch(d){}}},100);var t=function(a,c,g,j){var f;if(b.mouseHandler||b.mouseMoveHandler&&j=="mousemove"||b.mouseDownHandler&&j=="mousedown"||b.clickHandler&&j=="click"||b.doubleClickHandler&&j=="dblclick"){var e=a.which;!e&&a.button&&(a.button&1?e=1:a.button&4?e=2:a.button&2&&(e=3));f=g.getBoundingClientRect();var u= +d.body,k=d.documentElement,g=f.left+(window.pageXOffset||k.scrollLeft||u.scrollLeft)-(k.clientLeft||u.clientLeft||0);f=Math.round(f.top+(window.pageYOffset||k.scrollTop||u.scrollTop)-(k.clientTop||u.clientTop||0));g=Math.round(g);g=a.pageX-g;f=a.pageY-f;for(u=0;u=t&&g=m&&f=0&&n0?b(j):c.maxRowIndex!=null?c.maxRowIndex+1:0;d=d=void 0;if(typeof l.displayedColumnIndex==="undefined"){d=P(c.positionedItems,j);d=d.length>0?b(d)+1:0;f=g!=null?P(g,j):null;if(f!=null&&f.length>0){e=null;for(p=0;p0?b(g)+1:0}for(l.actualColumnIndex=d;D(c.positionedItems,j,d);)j++}else for(;;j++){d=P(c.positionedItems,j);d=d.length>0?b(d)+1:0;if(d<=l.actualColumnIndex)break}l.actualRowIndex=j}else if(typeof l.displayedColumnIndex==="undefined"){g=I(c.positionedItems);l.actualColumnIndex=g.length>0?b(g)+1:0}c.positionedItems.push(l);if(c.maxRowIndex==null||l.actualRowIndex>c.maxRowIndex)c.maxRowIndex=l.actualRowIndex}},P=function(a,h){for(var b=[],c=0;c0?"auto":b.itemHeight+"px";else{var g=a.clientHeight-2;g<0&&(g=0);c=g+"px";if(g0?"auto":b.itemHeight+"px"}a.isContentHeightInitialized=true}return c},w=function(a,h){var b=a.createElement("span");b.innerHTML=h;return b},y=function(a){var h;h=a.getFullYear();var b=a.getMonth()+1;b<10&&(b="0"+b);var c=a.getDate();c<10&&(c="0"+c);h=b+"/"+c+"/"+h;b=a.getHours();b<10&&(b="0"+b.toString());a=a.getMinutes();a<10&&(a="0"+a.toString());return h+" "+b+":"+a},C=function(a){return Math.ceil(a/36E5*1E4/100)/100+"h"},x=function(a){var b=new Date(Math.floor((new Date).valueOf()/ +864E5)*864E5),d=new Date,c,g;for(g=0;g0)for(var f=0;f0){d=true;for(c=0;c0;)a.removeChild(a.childNodes[c]);if(typeof b.isShapeVisible==="undefined"||b.isShapeVisible){c=d.taskTemplate;if(typeof b.taskTemplate!=="undefined")c= +b.taskTemplate;c=c(b);a.appendChild(c);if(typeof d.internalExtraTaskTemplate!=="undefined"){var g=d.internalExtraTaskTemplate(b);g!=null&&a.appendChild(g)}if(typeof d.extraTaskTemplate!=="undefined"){g=d.extraTaskTemplate(b);g!=null&&a.appendChild(g)}if(d.isTaskToolTipVisible){g=d.itemTemplate;if(typeof b.template!=="undefined")g=b.template;c.appendChild(g(b))}if(typeof b.predecessors!=="undefined")for(c=0;c0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[b]);return a.chartItemArea},S=function(a,b,d){return function(c){var g=typeof b!=="undefined"?b:c.networkDiagramView,j=typeof d!=="undefined"?d:g.settings,f=typeof a!=="undefined"?a:g.items, +e=g.ownerDocument,k=la(c),p=(j.itemWidth-j.shapeWidth)/2,m=p+j.shapeWidth,r=(j.itemHeight-j.shapeHeight)/2,t=r+j.shapeHeight,n=0,q=j.shapeHeight,v=j.shapeWidth;if(c.isMilestone){n=v/16;p=p+n;m=m-n;v=v-2*n}if(c.isMilestone){var o=e.createElementNS("http://www.w3.org/2000/svg","polygon");o.setAttribute("points",p+","+r+" "+(p-n)+","+(r+t)/2+" "+p+","+t+" "+m+","+t+" "+(m+n)+","+(r+t)/2+" "+m+","+r);n=j.milestoneClass;if(typeof c.milestoneClass!=="undefined")n=c.milestoneClass;if(typeof n!=="undefined")o.setAttribute("class", +n);else{n=j.milestoneStyle;if(typeof c.milestoneStyle!=="undefined")n=c.milestoneStyle;typeof n!=="undefined"&&o.setAttribute("style",n)}k.appendChild(o)}o=e.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x",p);o.setAttribute("y",r);o.setAttribute("width",Math.max(0,m-p-1));o.setAttribute("height",Math.max(0,t-r-1));n=j.shapeClass;if(typeof c.shapeClass!=="undefined")n=c.shapeClass;if(typeof n!=="undefined")o.setAttribute("class",n);else{n=j.shapeStyle;if(typeof c.shapeStyle!== +"undefined")n=c.shapeStyle;typeof n!=="undefined"&&o.setAttribute("style",n)}k.appendChild(o);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p);n.setAttribute("y1",r+q*3/8);n.setAttribute("x2",m-1);n.setAttribute("y2",r+q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n); +n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p);n.setAttribute("y1",t-q*3/8);n.setAttribute("x2",m-1);n.setAttribute("y2",t-q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p+v*3/8);n.setAttribute("y1", +r);n.setAttribute("x2",p+v*3/8);n.setAttribute("y2",r+q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",m-v*3/8);n.setAttribute("y1",r);n.setAttribute("x2",m-v*3/8);n.setAttribute("y2",r+q*3/8);o=j.shapeClass;if(typeof c.shapeClass!== +"undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",p+v*3/8);n.setAttribute("y1",t);n.setAttribute("x2",p+v*3/8);n.setAttribute("y2",t-q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle; +if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style",o);k.appendChild(n);n=e.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",m-v*3/8);n.setAttribute("y1",t);n.setAttribute("x2",m-v*3/8);n.setAttribute("y2",t-q*3/8);o=j.shapeClass;if(typeof c.shapeClass!=="undefined")o=c.shapeClass;typeof o!=="undefined"&&n.setAttribute("class",o);o=j.shapeStyle;if(typeof c.shapeStyle!=="undefined")o=c.shapeStyle;typeof o!=="undefined"&&n.setAttribute("style", +o);k.appendChild(n);o=e.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("x",(p+m)/2);o.setAttribute("y",t-q*3/8-6);o.setAttribute("style","font-weight: bold; text-anchor: middle");n=c.displayedText;typeof n==="undefined"&&(n="");o.appendChild(e.createTextNode(n));k.appendChild(o);var n=function(a){var a=j.dateTimeFormatter(new Date(a.valueOf()+(new Date).getTimezoneOffset()*6E4)),b;b=a.indexOf(" ");if(b>=0){value1=a.substr(0,b);value2=a.substr(b+1)}else{value1=a;value2=""}return[value1, +value2]},o=n(c.earlyStart),z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",p+v*3/8/2);z.setAttribute("y",t-q*5/8-20);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[0]));k.appendChild(z);z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",p+v*3/8/2);z.setAttribute("y",t-q*5/8-4);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[1]));k.appendChild(z);o=j.timeSpanFormatter(c.effort);z=e.createElementNS("http://www.w3.org/2000/svg", +"text");z.setAttribute("x",(p+m)/2);z.setAttribute("y",t-q*5/8-12);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o));k.appendChild(z);o=n(c.earlyFinish);z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",m-v*3/8/2);z.setAttribute("y",t-q*5/8-20);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[0]));k.appendChild(z);z=e.createElementNS("http://www.w3.org/2000/svg","text");z.setAttribute("x",m-v*3/8/2);z.setAttribute("y", +t-q*5/8-4);z.setAttribute("style","text-anchor: middle");z.appendChild(e.createTextNode(o[1]));k.appendChild(z);o=n(c.lateStart);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",p+v*3/8/2);q.setAttribute("y",t-20);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[0]));k.appendChild(q);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",p+v*3/8/2);q.setAttribute("y",t-4);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[1])); +k.appendChild(q);o=j.timeSpanFormatter(c.slack);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",(p+m)/2);q.setAttribute("y",t-12);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o));k.appendChild(q);o=n(c.lateFinish);q=e.createElementNS("http://www.w3.org/2000/svg","text");q.setAttribute("x",m-v*3/8/2);q.setAttribute("y",t-20);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[0]));k.appendChild(q);q=e.createElementNS("http://www.w3.org/2000/svg", +"text");q.setAttribute("x",m-v*3/8/2);q.setAttribute("y",t-4);q.setAttribute("style","text-anchor: middle");q.appendChild(e.createTextNode(o[1]));k.appendChild(q);if(j.canUserRearrangeItems){e=e.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",p);e.setAttribute("y",r);e.setAttribute("width",Math.max(0,m-p-1));e.setAttribute("height",Math.max(0,t-r-1));e.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(e);ka(e,c,f,F(c,j),H(c,j),g,j)}return k}}, +ca=function(a,b){return function(a,c){var g=a.networkDiagramView,d=typeof b!=="undefined"?b:g.settings,e=g.ownerDocument,g=e.createElementNS("http://www.w3.org/2000/svg","g"),f;f="M ";var k=F(a,d)-2,p=H(a,d)-2,m=F(c.item,d),r=H(c.item,d),t=F(a,d),n=H(a,d),q=Math.abs(t-m),v=Math.abs(n-r),o=d.shapeWidth+2,z=d.shapeHeight+2,y=o/2,x=z/2,w=Math.max(o,z),v=v=k.chartContentContainer.clientWidth-24){f=k.chartContentContainer.scrollLeft;k.chartContentContainer.scrollLeft=k.chartContentContainer.scrollLeft+48;f=k.chartContentContainer.scrollLeft-f;if(typeof k.draggingInitialThumbXPosition!== +"undefined")k.draggingInitialThumbXPosition=k.draggingInitialThumbXPosition+f}}k=a.clientY;a=j;if(typeof a.draggingItem!=="undefined"){f=a;m=0;if(f.offsetParent){do{m=m+f.offsetTop;f=f.offsetParent}while(f)}k=k-m;if(k<24){k=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop-48;k=k-a.chartContentContainer.scrollTop;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition-k}else if(k>=a.chartContentContainer.clientHeight- +24){k=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop+48;k=a.chartContentContainer.scrollTop-k;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition+k}}delete j.draggingItem;j.draggingInitialThumbXPosition+c<0&&(c=-j.draggingInitialThumbXPosition);j.draggingInitialThumbYPosition+g<0&&(g=-j.draggingInitialThumbYPosition);a=b;g=(j.draggingInitialThumbYPosition+g-e.diagramMargin)/(e.itemHeight+ +e.minDependencyLineLength/e.aspectRatio);e.snapRearrangedItemsToGuidelines&&(g=Math.round(g));a.actualRowIndex=g;g=b;c=(j.draggingInitialThumbXPosition+c-e.diagramMargin)/(e.itemWidth+e.minDependencyLineLength);e.snapRearrangedItemsToGuidelines&&(c=Math.round(c));g.actualColumnIndex=c;N(b,"actualRowIndex",true,false);N(b,"actualColumnIndex",true,false);typeof b.displayedColumnIndex!=="undefined"&&delete b.displayedColumnIndex;typeof b.displayedRowIndex!=="undefined"&&delete b.displayedRowIndex;ma(b, +d,j.chartContent,e,false);j.draggingItem=b;j.draggingPerformed=true}};j.addEventListener("mousemove",function(a){m(a)},true);j.addEventListener("touchmove",function(a){m(a.touches[0])},true);var r=function(){if(!(typeof j.draggingItem==="undefined"||j.draggingItem!=b||j.dragType!="Position")){ma(b,d,j.chartContent,e,true);var a=j.draggingItem;delete j.draggingItem;j.style.cursor="default";if(j.draggingPerformed){N(a,"actualColumnIndex",true,true);N(a,"actualRowIndex",true,true);delete j.draggingPerformed}}}; +document.addEventListener("mouseup",function(a){a.button==0&&r()},true);document.addEventListener("touchend",function(){r()},true);j.draggableItems.push(b)}},ma=function(a,b,d,c,g){var e=a.networkDiagramView.ownerDocument;if(g){if(typeof d.temporaryRectangle!=="undefined"){e=d.chartArea;e.removeChild(d.temporaryRectangle);delete d.temporaryRectangle}setTimeout(function(){Q(a.chartItem,a,c);A(b,a);setTimeout(function(){ea(d,b,c,true)},0)})}else{if(typeof d.temporaryRectangle!=="undefined")g=d.temporaryRectangle; +else{g=e.createElementNS("http://www.w3.org/2000/svg","rect");g.setAttribute("x",0);g.setAttribute("y",0);g.setAttribute("width",c.shapeWidth);g.setAttribute("height",c.shapeHeight);typeof c.temporaryThumbClass!=="undefined"&&g.setAttribute("class",c.temporaryThumbClass);g.setAttribute("style",c.temporaryThumbStyle);d.temporaryRectangle=g;e=d.chartArea;e.appendChild(g)}var e=F(a,c)+(c.itemWidth-c.shapeWidth)/2,f=H(a,c)+(c.itemHeight-c.shapeHeight)/2;g.setAttribute("transform","translate("+e+", "+ +f+")");setTimeout(function(){ea(d,b,c,false)},0)}},ea=function(a,b,d,c){var g=K(b,d),b=E(b,d);if(c||g>a.clientWidth)a.style.width=g+"px";if(c||b>a.clientHeight)a.style.height=b+"px";a=a.chartArea;c?a.setAttribute("style","width: "+g+"px; height: "+b+"px"):a.setAttribute("style","width: "+Math.max(a.clientWidth,g)+"px; height: "+Math.max(a.clientHeight,b)+"px")},na=function(a,b){for(var d=a.childNodes.length;d-- >0;)a.removeChild(a.childNodes[d]);a.appendChild(b)},fa=function(a,b){for(var d in b)d.indexOf("custom")!= +0&&d.indexOf("description")!=0||typeof a[d]==="undefined"&&(a[d]=b[d])},ha=function(a,b,d,c,g,e,f,u,k){var d={isExport:true,canUserRearrangeItems:false,isTaskToolTipVisible:false,isDependencyToolTipVisible:false,containerClass:k.containerClass,containerStyle:k.containerStyle,border:k.border,theme:k.theme,itemWidth:k.itemWidth,itemHeight:k.itemHeight,aspectRatio:k.aspectRatio,shapeWidth:k.shapeWidth,shapeHeight:k.shapeHeight,shapeClass:k.shapeClass,milestoneClass:k.milestoneClass,shapeStyle:k.shapeStyle, +milestoneStyle:k.milestoneStyle,dependencyLineClass:k.dependencyLineClass,dependencyLineStyle:k.dependencyLineStyle,minDependencyLineLength:k.minDependencyLineLength,diagramMargin:0,target:k.target,dateTimeFormatter:k.dateTimeFormatter,timeSpanFormatter:k.timeSpanFormatter,isRelativeToTimezone:k.isRelativeToTimezone,taskTemplate:k.taskTemplate,dependencyLineTemplate:k.dependencyLineTemplate},k=K(u,d),p=E(u,d);d.chartWidth=k+"px";d.chartHeight=p+"px";var m=k+2,k=p+2,r,t,n=false;if(c!=null&&typeof c.createElement!== +"undefined")r=c;else{if(c!=null&&typeof c.focus!=="undefined")t=c;else{t=window.open("",c!=null?c:"_blank",typeof g!=="undefined"&&g&&(typeof f==="undefined"||f)?"width=320,height=100,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");n=true}r=t.document;try{for(var q=document.head.getElementsByTagName("link"),c=0;c +0;){g=b[c];if(ja(g).length==0)break a}g=null}if(g==null)return[];c=[d];d=ga(d,g);for(g=0;g=0&&c.push(u)}}return c},ga=function(a,b){if(a==null||b==null||a==b||typeof b.predecessors==="undefined")return[];var d=[],c=[],g,e=null;for(g=0;g0&&(f=f+predecessorItem.item.effort);if(e==null||f>=e){if(e==null||f>e){e=f;c=[]}c.push(predecessorItem)}}}}for(g=0;g0?e.predecessorItem.item.effort:0);f<0&&(f=0);if(d==null||f>d)d=f}}return d},ja=function(a){for(var b=[],d=a.networkDiagramView.items,c=0;cb)b=a[d];return b},f=function(a){return typeof a!=="undefined"?new Date(a.valueOf()+a.getTimezoneOffset()*6E4):a},d=function(a){return typeof a!=="undefined"?new Date(a.valueOf()-a.getTimezoneOffset()*6E4):a},e=function(a,b,e){for(var c=0;ca.networkDiagramView.chartContentContainer.clientWidth-a.networkDiagramView.settings.itemWidth)a.networkDiagramView.chartContentContainer.scrollLeft=b-(a.networkDiagramView.chartContentContainer.clientWidth-a.networkDiagramView.settings.itemWidth); +b=H(a,e);c=b-a.networkDiagramView.chartContentContainer.scrollTop;if(c<0)a.networkDiagramView.chartContentContainer.scrollTop=b;else if(c>a.networkDiagramView.chartContentContainer.clientHeight-a.networkDiagramView.settings.itemHeight)a.networkDiagramView.chartContentContainer.scrollTop=b-(a.networkDiagramView.chartContentContainer.clientHeight-a.networkDiagramView.settings.itemHeight)};a.scrollToLeft=function(){a.chartContentContainer.scrollLeft=0};a.scrollToRight=function(){a.chartContentContainer.scrollLeft= +a.chartContent.clientWidth};a.scrollToTop=function(){a.chartContentContainer.scrollTop=0};a.scrollToBottom=function(){a.chartContentContainer.scrollTop=a.chartContent.clientHeight};a.getChartWidth=function(){return K(b,e)};a.getChartHeight=function(){return E(b,e)};a.getItemTop=function(a){return H(a,e)};a.getItemLeft=function(a){return F(a,e)};a.onItemPropertyChanged=N;a.initializeTaskDraggingThumbs=function(b,c,d,e){ka(b,c,a.items,d,e,a,a.settings)};a.exportContent=function(a,c){typeof a==="undefined"&& +(a={});ha(a.title,a.preparingMessage,a.isRelativeToTimezone,c,false,a.rotate,false,b,e)};a.print=function(a){typeof a==="undefined"&&(a={});ha(a.title,a.preparingMessage,a.isRelativeToTimezone,null,true,a.rotate,a.autoClose,b,e)};a.isItemCritical=function(a,c){return Y(c,b).indexOf(a)>=0};a.isDependencyCritical=function(a,c){return ia(c,b).indexOf(a)>=0};a.getCriticalItems=function(a){return Y(a,b)};a.getCriticalDependencies=function(a){return ia(a,b)};a.repositionEnds=function(){if(b.length!=0){for(var a= +false,c=0;c1)break}if(e>1)break}}e>1&&(a=true)}c=b[0];c.displayedRowIndex=a?0.5:0;d=b[b.length-1];d.displayedRowIndex=a?0.5:0;X(c);X(d)}};a.getOutputDate=f;a.getInputDate=d};return{initialize:L,initializeItems:U,refresh:M,getDefaultStyleDefinitionTemplate:aa,getDefaultTaskTemplate:S, +getDefaultItemTemplate:ba,getDefaultDependencyLineTemplate:ca,getDefaultPredecessorItemTemplate:da,initializeTaskDraggingThumbs:function(a,b,d,c){b.networkDiagramView.initializeTaskDraggingThumbs(a,b,d,c)},defaultDateTimeFormatter:function(a){return y(new Date(a.valueOf()+(new Date).getTimezoneOffset()*6E4))},defaultTimeSpanFormatter:C,getOutputDate:f,getInputDate:d}}()); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.React.Components.jsx b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.React.Components.jsx new file mode 100644 index 000000000..f1a3805e4 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.React.Components.jsx @@ -0,0 +1,36 @@ +import React from 'react'; +const DlhSoft = window.DlhSoft; + +export var PertChartView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.Pert.PertChartView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); + +export var NetworkDiagramView = React.forwardRef(function(props, ref) { + if (!ref) ref = React.createRef(); + var element =
{props.children}
; + var changeHandler = props.settings.itemPropertyChangeHandler; + setTimeout(function() { + DlhSoft.Controls.Pert.NetworkDiagramView.initialize(ref.current, props.items, props.settings, props.license); + if (props.change) { + props.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + props.change(item, propertyName, isDirect, isFinal); + } + } + }); + return element; +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Vue.Components.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Vue.Components.js new file mode 100644 index 000000000..f28998951 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.ProjectData.PertChart.Vue.Components.js @@ -0,0 +1,29 @@ +Vue.component('pert-chart', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.PertChartView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); + +Vue.component('network-diagram', { + template: '
', + props: ['items', 'settings', 'license'], + mounted: function() { + var vm = this; + var changeHandler = vm.settings.itemPropertyChangeHandler; + DlhSoft.Controls.Pert.NetworkDiagramView.initialize(vm.$el, vm.items, vm.settings, vm.license); + vm.settings.itemPropertyChangeHandler = function(item, propertyName, isDirect, isFinal) { + if (changeHandler) + changeHandler(item, propertyName, isDirect, isFinal); + vm.$emit('change', {item: item, propertyName: propertyName, isDirect: isDirect, isFinal: isFinal}); + } + } +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.d.ts new file mode 100644 index 000000000..2e92d969e --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.d.ts @@ -0,0 +1,167 @@ + /** @namespace System */ + + /** + * @memberof System + * @callback System.Action + * @return {void} + */ + + /** @namespace System.ComponentModel */ + + /** + * @memberof System.ComponentModel + * @callback System.ComponentModel.PropertyChangedEventHandler + * @param {Object} sender + * @param {System.ComponentModel.PropertyChangedEventArgs} e + * @return {void} + */ + +/// + +declare module DlhSoft.UndoManagementLibrary { + /** @namespace DlhSoft.UndoManagementLibrary */ + + /** + * Provides support for recording (or executing and automatically recording) and undoing or redoing actions. + * + * @public + * @class DlhSoft.UndoManagementLibrary.UndoStack + * @implements System.ComponentModel.INotifyPropertyChanged + */ + export interface UndoStack extends System.ComponentModel.INotifyPropertyChanged { + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function addPropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + addPropertyChanged(value: {(sender: Object, e: System.ComponentModel.PropertyChangedEventArgs): void}): void; + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function removePropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + removePropertyChanged(value: {(sender: Object, e: System.ComponentModel.PropertyChangedEventArgs): void}): void; + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanUndo + * @return {boolean} + */ + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @function setCanUndo + */ + getCanUndo(): boolean; + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanRedo + * @return {boolean} + */ + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @function setCanRedo + */ + getCanRedo(): boolean; + /** + * Records an already executed action to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatWasDone + * @param {System.Action} howToUndo + * @param {?number} whenWasDone + * @return {void} + */ + record(whatWasDone: {(): void}, howToUndo: {(): void}, whenWasDone?: number): void; + /** + * Executes an action and records it to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatToDo + * @param {System.Action} howToUndo + * @return {void} + */ + doAndRecord(whatToDo: {(): void}, howToUndo: {(): void}): void; + /** + * Undoes the last completed action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + undo(relatedActionSpan?: number): void; + /** + * Redoes the last undone action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + redo(relatedActionSpan?: number): void; + /** + * Raises PropertyChanged event. + * + * @instance + * @protected + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {string} propertyName + * @return {void} + */ + onPropertyChanged(propertyName: string): void; + } + export interface UndoStackFunc extends Function { + prototype: UndoStack; + ActionRecord: UndoStack.ActionRecordFunc; + new (): UndoStack; + } + var UndoStack: UndoStackFunc; + module UndoStack { + export interface ActionRecord { + whatWasDone: {(): void}; + howToUndo: {(): void}; + whenWasDone: number; + } + export interface ActionRecordFunc extends Function { + prototype: ActionRecord; + new (): ActionRecord; + } + } + +} \ No newline at end of file diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.js new file mode 100644 index 000000000..2c7d71af0 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.js @@ -0,0 +1,251 @@ +/** + * @version 1.0.0.0 + * @copyright Copyright © DlhSoft 2017 + * @compiler Bridge.NET 15.7.0 + */ +Bridge.assembly("DlhSoft.UndoManagementLibrary", function ($asm, globals) { + "use strict"; + + /** @namespace System */ + + /** + * @memberof System + * @callback System.Action + * @return {void} + */ + + /** @namespace System.ComponentModel */ + + /** + * @memberof System.ComponentModel + * @callback System.ComponentModel.PropertyChangedEventHandler + * @param {Object} sender + * @param {System.ComponentModel.PropertyChangedEventArgs} e + * @return {void} + */ + + /** @namespace DlhSoft.UndoManagementLibrary */ + + /** + * Provides support for recording (or executing and automatically recording) and undoing or redoing actions. + * + * @public + * @class DlhSoft.UndoManagementLibrary.UndoStack + * @implements System.ComponentModel.INotifyPropertyChanged + */ + Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack", { + inherits: [System.ComponentModel.INotifyPropertyChanged], + completedActions: null, + undoneActions: null, + config: { + events: { + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function addPropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + /** + * Occurs when CanUndo/CanRedo property values change. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function removePropertyChanged + * @param {System.ComponentModel.PropertyChangedEventHandler} value + * @return {void} + */ + PropertyChanged: null + }, + alias: [ + "addPropertyChanged", "System$ComponentModel$INotifyPropertyChanged$addPropertyChanged", + "removePropertyChanged", "System$ComponentModel$INotifyPropertyChanged$removePropertyChanged" + ], + init: function () { + this.completedActions = new (System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord))(); + this.undoneActions = new (System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord))(); + } + }, + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanUndo + * @return {boolean} + */ + /** + * Indicates whether there are any completed operations that can be undone. + * + * @instance + * @function setCanUndo + */ + getCanUndo: function () { + return System.Linq.Enumerable.from(this.completedActions).any(); + }, + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @function getCanRedo + * @return {boolean} + */ + /** + * Indicates whether there are any undone operations that can be redone. + * + * @instance + * @function setCanRedo + */ + getCanRedo: function () { + return System.Linq.Enumerable.from(this.undoneActions).any(); + }, + /** + * Records an already executed action to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatWasDone + * @param {System.Action} howToUndo + * @param {?number} whenWasDone + * @return {void} + */ + record: function (whatWasDone, howToUndo, whenWasDone) { + var $t; + if (whenWasDone === void 0) { whenWasDone = null; } + var originallyCanUndo = this.getCanUndo(); + var originallyCanRedo = this.getCanRedo(); + this.undoneActions.clear(); + this.completedActions.insert(0, Bridge.merge(new DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord(), { + whatWasDone: whatWasDone, + howToUndo: howToUndo, + whenWasDone: ($t = whenWasDone, $t != null ? $t : System.Int64.clip32(System.Int64((new Date()).getTime()).mul(10000).div(System.Int64(10000)))) + } )); + if (!originallyCanUndo) { + this.onPropertyChanged("canUndo"); + } + if (originallyCanRedo) { + this.onPropertyChanged("canRedo"); + } + }, + /** + * Executes an action and records it to the undo stack. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {System.Action} whatToDo + * @param {System.Action} howToUndo + * @return {void} + */ + doAndRecord: function (whatToDo, howToUndo) { + var now = new Date(); + whatToDo(); + this.record(whatToDo, howToUndo, System.Int64.clip32(System.Int64((now).getTime()).mul(10000).div(System.Int64(10000)))); + }, + /** + * Undoes the last completed action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + undo: function (relatedActionSpan) { + if (relatedActionSpan === void 0) { relatedActionSpan = null; } + if (!this.getCanUndo()) { + return; + } + if (relatedActionSpan == null) { + relatedActionSpan = 0; + } + var originallyCanRedo = this.getCanRedo(); + while (true) { + var lastCompletedAction = System.Linq.Enumerable.from(this.completedActions).first(); + this.completedActions.removeAt(0); + lastCompletedAction.howToUndo(); + this.undoneActions.insert(0, lastCompletedAction); + var previouslyCompletedAction = System.Linq.Enumerable.from(this.completedActions).firstOrDefault(null, null); + if (previouslyCompletedAction == null || System.Nullable.gt(Bridge.Int.clip32(lastCompletedAction.whenWasDone - previouslyCompletedAction.whenWasDone), relatedActionSpan)) { + break; + } + } + if (!this.getCanUndo()) { + this.onPropertyChanged("canUndo"); + } + if (!originallyCanRedo) { + this.onPropertyChanged("canRedo"); + } + }, + /** + * Redoes the last undone action and related actions. + * + * @instance + * @public + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {?number} relatedActionSpan Maximum time span in milliseconds to consider for determining related actions. + * @return {void} + */ + redo: function (relatedActionSpan) { + if (relatedActionSpan === void 0) { relatedActionSpan = null; } + if (!this.getCanRedo()) { + return; + } + if (relatedActionSpan == null) { + relatedActionSpan = 0; + } + var originallyCanUndo = this.getCanUndo(); + while (true) { + var lastUndoneAction = System.Linq.Enumerable.from(this.undoneActions).first(); + this.undoneActions.removeAt(0); + lastUndoneAction.whatWasDone(); + this.completedActions.insert(0, lastUndoneAction); + var previouslyUndoneAction = System.Linq.Enumerable.from(this.undoneActions).firstOrDefault(null, null); + if (previouslyUndoneAction == null || System.Nullable.gt(Bridge.Int.clip32(previouslyUndoneAction.whenWasDone - lastUndoneAction.whenWasDone), relatedActionSpan)) { + break; + } + } + if (!this.getCanRedo()) { + this.onPropertyChanged("canRedo"); + } + if (!originallyCanUndo) { + this.onPropertyChanged("canUndo"); + } + }, + /** + * Raises PropertyChanged event. + * + * @instance + * @protected + * @this DlhSoft.UndoManagementLibrary.UndoStack + * @memberof DlhSoft.UndoManagementLibrary.UndoStack + * @param {string} propertyName + * @return {void} + */ + onPropertyChanged: function (propertyName) { + !Bridge.staticEquals(this.PropertyChanged, null) ? this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)) : null; + } + }); + + Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord", { + whatWasDone: null, + howToUndo: null, + whenWasDone: 0 + }); +}); diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.min.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.min.js new file mode 100644 index 000000000..72bb0062e --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/DlhSoft.UndoManagementLibrary.min.js @@ -0,0 +1 @@ +Bridge.assembly("DlhSoft.UndoManagementLibrary",function(){"use strict";Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack",{inherits:[System.ComponentModel.INotifyPropertyChanged],completedActions:null,undoneActions:null,config:{events:{PropertyChanged:null},alias:["addPropertyChanged","System$ComponentModel$INotifyPropertyChanged$addPropertyChanged","removePropertyChanged","System$ComponentModel$INotifyPropertyChanged$removePropertyChanged"],init:function(){this.completedActions=new(System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord));this.undoneActions=new(System.Collections.Generic.List$1(DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord))}},getCanUndo:function(){return System.Linq.Enumerable.from(this.completedActions).any()},getCanRedo:function(){return System.Linq.Enumerable.from(this.undoneActions).any()},record:function(whatWasDone,howToUndo,whenWasDone){var $t,originallyCanUndo,originallyCanRedo;if(whenWasDone===void 0&&(whenWasDone=null),originallyCanUndo=this.getCanUndo(),originallyCanRedo=this.getCanRedo(),this.undoneActions.clear(),this.completedActions.insert(0,Bridge.merge(new DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord,{whatWasDone:whatWasDone,howToUndo:howToUndo,whenWasDone:($t=whenWasDone,$t!=null?$t:System.Int64.clip32(System.Int64((new Date).getTime()).mul(1e4).div(System.Int64(1e4))))})),!originallyCanUndo)this.onPropertyChanged("canUndo");if(originallyCanRedo)this.onPropertyChanged("canRedo")},doAndRecord:function(whatToDo,howToUndo){var now=new Date;whatToDo();this.record(whatToDo,howToUndo,System.Int64.clip32(System.Int64(now.getTime()).mul(1e4).div(System.Int64(1e4))))},undo:function(relatedActionSpan){var originallyCanRedo,lastCompletedAction,previouslyCompletedAction;if(relatedActionSpan===void 0&&(relatedActionSpan=null),this.getCanUndo()){for(relatedActionSpan==null&&(relatedActionSpan=0),originallyCanRedo=this.getCanRedo();;)if(lastCompletedAction=System.Linq.Enumerable.from(this.completedActions).first(),this.completedActions.removeAt(0),lastCompletedAction.howToUndo(),this.undoneActions.insert(0,lastCompletedAction),previouslyCompletedAction=System.Linq.Enumerable.from(this.completedActions).firstOrDefault(null,null),previouslyCompletedAction==null||System.Nullable.gt(Bridge.Int.clip32(lastCompletedAction.whenWasDone-previouslyCompletedAction.whenWasDone),relatedActionSpan))break;if(!this.getCanUndo())this.onPropertyChanged("canUndo");if(!originallyCanRedo)this.onPropertyChanged("canRedo")}},redo:function(relatedActionSpan){var originallyCanUndo,lastUndoneAction,previouslyUndoneAction;if(relatedActionSpan===void 0&&(relatedActionSpan=null),this.getCanRedo()){for(relatedActionSpan==null&&(relatedActionSpan=0),originallyCanUndo=this.getCanUndo();;)if(lastUndoneAction=System.Linq.Enumerable.from(this.undoneActions).first(),this.undoneActions.removeAt(0),lastUndoneAction.whatWasDone(),this.completedActions.insert(0,lastUndoneAction),previouslyUndoneAction=System.Linq.Enumerable.from(this.undoneActions).firstOrDefault(null,null),previouslyUndoneAction==null||System.Nullable.gt(Bridge.Int.clip32(previouslyUndoneAction.whenWasDone-lastUndoneAction.whenWasDone),relatedActionSpan))break;if(!this.getCanRedo())this.onPropertyChanged("canRedo");if(!originallyCanUndo)this.onPropertyChanged("canUndo")}},onPropertyChanged:function(propertyName){Bridge.staticEquals(this.PropertyChanged,null)?null:this.PropertyChanged(this,new System.ComponentModel.PropertyChangedEventArgs(propertyName))}});Bridge.define("DlhSoft.UndoManagementLibrary.UndoStack.ActionRecord",{whatWasDone:null,howToUndo:null,whenWasDone:0})}); \ No newline at end of file diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/bridge.d.ts b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/bridge.d.ts new file mode 100644 index 000000000..753de0b13 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/bridge.d.ts @@ -0,0 +1,972 @@ +/* + * @version : 15.7.0 - Bridge.NET + * @author : Object.NET, Inc. http://bridge.net/ + * @date : 2017-01-16 + * @copyright : Copyright 2008-2017 Object.NET, Inc. http://object.net/ + * @license : See license.txt and https://github.com/bridgedotnet/Bridge.NET/blob/master/LICENSE. + */ +declare module Bridge { + export function global(): T; + export function emptyFn(): Function; + export function property(scope: any, name: string, defaultValue: any): void; + export function event(scope: any, name: string, defaultValue: any): void; + export function copy(to: T, from: T, keys: string[], toIf?: boolean): T; + export function copy(to: T, from: T, keys: string, toIf?: boolean): T; + export function ns(ns: string, scope?: any): any; + export function ready(fn: { (): void }): void; + export function on(event: string, el: HTMLElement, fn: Function): void; + export function getHashCode(value: any, safe: boolean): number; + export function getDefaultValue(type: { prototype: T }): T; + export function getTypeName(obj: any): string; + export function is(obj: any, type: any, ignoreFn?: boolean): boolean; + export function as(obj: any, type: { prototype: T }): T; + export function cast(obj: any, type: { prototype: T }): T; + export function apply(obj: T, values: any): T; + export function merge(to: T, from: T): T; + export function getEnumerator(obj: any): System.Collections.IEnumerator; + export function getPropertyNames(obj: any, includeFunctions?: boolean): string[]; + export function isDefined(value: any, noNull?: boolean): boolean; + export function isEmpty(value: any, allowEmpty?: boolean): boolean; + export function toArray(ienumerable: any[]): any[]; + export function toArray(ienumerable: T[]): T[]; + export function toArray(ienumerable: any): T[]; + export function isArray(obj: any): boolean; + export function isFunction(obj: any): boolean; + export function isDate(obj: any): boolean; + export function isNull(obj: any): boolean; + export function isBoolean(obj: any): boolean; + export function isNumber(obj: any): boolean; + export function isString(obj: any): boolean; + export function unroll(value: string): any; + export function equals(a: any, b: any): boolean; + export function objectEquals(a: any, b: any): boolean; + export function deepEquals(a: any, b: any): boolean; + export function compare(a: any, b: any, safe?: boolean): boolean; + export function equalsT(a: any, b: any): boolean; + export function format(obj: any, formatString?: string): string; + export function getType(instance: any): any; + export function isLower(c: number): boolean; + export function isUpper(c: number): boolean; + + export interface fnMethods { + call(obj: any, fnName: string): any; + bind(obj: any, method: Function, args?: any[], appendArgs?: boolean): Function; + bindScope(obj: any, method: Function): Function; + combine(fn1: Function, fn2: Function): Function; + remove(fn1: Function, fn2: Function): Function; + } + + var fn: fnMethods; + + export interface Array { + get(arr: any[], indices: number[]): any; + set(arr: any[], indices: number[], value: any); + getLength(arr: any[], dimension: number): number; + getRank(arr: any[]): number; + create(defValue: any, initValues: any[], sizes: number[]): any[]; + toEnumerable(array: any[]): System.Collections.IEnumerable; + toEnumerable(array: T[]): System.Collections.Generic.IEnumerable$1; + toEnumerator(array: any[]): System.Collections.IEnumerator; + toEnumerator(array: T[]): System.Collections.Generic.IEnumerator$1; + } + + var Array: Array; + + export interface String { + isNullOrWhiteSpace(value: string): boolean; + isNullOrEmpty(value: string): boolean; + fromCharCount(c: number, count: number): string; + format(str: string, ...args: any[]): string; + alignString(str: string, alignment: number, pad: string, dir: number): string; + startsWith(str: string, prefix: string): boolean; + endsWith(str: string, suffix: string): boolean; + contains(str: string, value: string): string; + indexOfAny(str: string, anyOf: number[], startIndex?: number, length?: number): number; + indexOf(str: string, value: string): number; + compare(strA: string, strB: string): number; + toCharArray(str: string, startIndex: number, length: number): number[]; + } + + var String: String; + + export interface Class { + define(className: string, props: any): Function; + define(className: string, scope: any, props: any): Function; + generic(className: string, props: any): Function; + generic(className: string, scope: any, props: any): Function; + } + + var Class: Class; + export function define(className: string, props: any): Function; + export function define(className: string, scope: any, props: any): Function; + + export class ErrorException extends System.Exception { + constructor(error: Error); + getError(): Error; + } + + export interface IPromise { + then(fulfilledHandler: Function, errorHandler?: Function): void; + } + var IPromise: Function; + + export interface Int extends System.IComparable$1, System.IEquatable$1 { + instanceOf(instance): boolean; + getDefaultValue(): number; + format(num: number, format?: string, provider?: System.Globalization.NumberFormatInfo): string; + parseFloat(str: string, provider?: System.Globalization.NumberFormatInfo): number; + tryParseFloat(str: string, provider: System.Globalization.NumberFormatInfo, result: { v: number }): boolean; + parseInt(str: string, min?: number, max?: number, radix?: number): number; + tryParseInt(str: string, result: { v: number }, min?: number, max?: number, radix?: number): boolean; + trunc(num: number): number; + div(x: number, y: number): number; + } + var Int: Int; + + export interface Browser { + isStrict: boolean; + isIEQuirks: boolean; + isOpera: boolean; + isOpera10_5: boolean; + isWebKit: boolean; + isChrome: boolean; + isSafari: boolean; + isSafari3: boolean; + isSafari4: boolean; + isSafari5: boolean; + isSafari5_0: boolean; + isSafari2: boolean; + isIE: boolean; + isIE6: boolean; + isIE7: boolean; + isIE7m: boolean; + isIE7p: boolean; + isIE8: boolean; + isIE8m: boolean; + isIE8p: boolean; + isIE9: boolean; + isIE9m: boolean; + isIE9p: boolean; + isIE10: boolean; + isIE10m: boolean; + isIE10p: boolean; + isIE11: boolean; + isIE11m: boolean; + isIE11p: boolean; + isGecko: boolean; + isGecko3: boolean; + isGecko4: boolean; + isGecko5: boolean; + isGecko10: boolean; + isFF3_0: boolean; + isFF3_5: boolean; + isFF3_6: boolean; + isFF4: boolean; + isFF5: boolean; + isFF10: boolean; + isLinux: boolean; + isWindows: boolean; + isMac: boolean; + chromeVersion: number; + firefoxVersion: number; + ieVersion: number; + operaVersion: number; + safariVersion: number; + webKitVersion: number; + isSecure: boolean; + isiPhone: boolean; + isiPod: boolean; + isiPad: boolean; + isBlackberry: boolean; + isAndroid: boolean; + isDesktop: boolean; + isTablet: boolean; + isPhone: boolean; + iOS: boolean; + standalone: boolean; + } + + var Browser: Browser; + + export class CustomEnumerator implements System.Collections.IEnumerator { + constructor(moveNext: Function, getCurrent: Function, reset?: Function, dispose?: Function, scope?: any); + moveNext(): boolean; + getCurrent(): any; + reset(): void; + dispose(): void; + } + + export class ArrayEnumerator implements System.Collections.IEnumerator { + constructor(array: any[]); + moveNext(): boolean; + getCurrent(): any; + reset(): void; + dispose(): void; + } + + export class ArrayEnumerable implements System.Collections.IEnumerable { + constructor(array: any[]); + getEnumerator(): ArrayEnumerator; + } + + export interface Validation { + isNull(value: any): boolean; + isEmpty(value: any): boolean; + isNotEmptyOrWhitespace(value: any): boolean; + isNotNull(value: any): boolean; + isNotEmpty(value: any): boolean; + email(value: string): boolean; + url(value: string): boolean; + alpha(value: string): boolean; + alphaNum(value: string): boolean; + creditCard(value: string, type: string): boolean; + } + + var Validation: Validation; +} + +declare module System { + export class Attribute { + } + + export interface Nullable { + hasValue(obj: any): boolean; + getValue(obj: T): T; + getValue(obj: any): any; + getValueOrDefault(obj: T, defValue: T): T; + add(a: number, b: number): number; + band(a: number, b: number): number; + bor(a: number, b: number): number; + and(a: boolean, b: boolean): boolean; + or(a: boolean, b: boolean): boolean; + div(a: number, b: number): number; + eq(a: any, b: any): boolean; + xor(a: number, b: number): number; + gt(a: any, b: any): boolean; + gte(a: any, b: any): boolean; + neq(a: any, b: any): boolean; + lt(a: any, b: any): boolean; + lte(a: any, b: any): boolean; + mod(a: number, b: number): number; + mul(a: number, b: number): number; + sl(a: number, b: number): number; + sr(a: number, b: number): number; + sub(a: number, b: number): number; + bnot(a: number): number; + neg(a: number): number; + not(a: boolean): boolean; + pos(a: number): number; + } + + var Nullable: Nullable; + + export interface Char { + isWhiteSpace(value: string): boolean; + isDigit(value: number): boolean; + isLetter(value: number): boolean; + isHighSurrogate(value: number): boolean; + isLowSurrogate(value: number): boolean; + isSurrogate(value: number): boolean; + isSymbol(value: number): boolean; + isSeparator(value: number): boolean; + isPunctuation(value: number): boolean; + isNumber(value: number): boolean; + isControl(value: number): boolean; + } + + var Char: Char; + + export class Exception { + constructor(message: string, innerException?: Exception); + getMessage(): string; + getInnerException(): Exception; + getStackTrace(): any; + getData(): T; + toString(): string; + static create(error: string): Exception; + static create(error: Error): Exception; + } + + export class SystemException extends Exception { + constructor(message: string, innerException: Exception); + constructor(message: string); + } + + export class OutOfMemoryException extends SystemException { + constructor(message: string, innerException: Exception); + constructor(message: string); + } + + export class IndexOutOfRangeException extends SystemException { + constructor(message: string, innerException: Exception); + constructor(message: string); + } + + export class ArgumentException extends Exception { + constructor(message: string, paramName: string, innerException: Exception); + constructor(message: string, innerException: Exception); + constructor(message: string); + getParamName(): string; + } + + export class ArgumentNullException extends ArgumentException { + constructor(paramName: string, message?: string, innerException?: Exception); + } + + export class ArgumentOutOfRangeException extends ArgumentException { + constructor(paramName: string, message?: string, innerException?: Exception, actualValue?: any); + getActualValue(): T; + } + + export class ArithmeticException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class DivideByZeroException extends ArithmeticException { + constructor(message?: string, innerException?: Exception); + } + + export class OverflowException extends ArithmeticException { + constructor(message?: string, innerException?: Exception); + } + + export class FormatException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class InvalidCastException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class InvalidOperationException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class NotImplementedException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class NotSupportedException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export class NullReferenceException extends Exception { + constructor(message?: string, innerException?: Exception); + } + + export interface IFormattable { + format(format: string, formatProvider: IFormatProvider): string; + } + var IFormattable: Function; + + export interface IComparable { + compareTo(obj: any): number; + } + var IComparable: Function; + + export interface IFormatProvider { + getFormat(formatType: any): any; + } + + export interface ICloneable { + clone(): any; + } + var ICloneable: Function; + + export interface IComparable$1 { + compareTo(other: T): number; + } + export function IComparable$1(T: { prototype: T }): { + prototype: IComparable$1; + } + + export interface IEquatable$1 { + equals(other: T): boolean; + } + export function IEquatable$1(T: { prototype: T }): { + prototype: IEquatable$1; + } + + export interface IDisposable { + dispose(): void; + } + var IDisposable: Function; + + export interface DateTime { + utcNow(): Date; + today(): Date; + format(date: Date, format?: string, provider?: System.Globalization.DateTimeFormatInfo): string; + parse(value: string, provider?: System.Globalization.DateTimeFormatInfo): Date; + parseExact(str: string, format?: string, provider?: System.Globalization.DateTimeFormatInfo, silent?: boolean): Date; + tryParse(str: string, provider: System.Globalization.DateTimeFormatInfo, result: { v: Date }): boolean; + tryParseExact(str: string, format: string, provider: System.Globalization.DateTimeFormatInfo, result: { v: Date }): boolean; + isDaylightSavingTime(dt: Date): boolean; + toUTC(dt: Date): Date; + toLocal(dt: Date): Date; + } + var Date: DateTime; + + export interface Guid extends System.IEquatable$1, System.IComparable$1, System.IFormattable { + equalsT(o: System.Guid): boolean; + compareTo(value: System.Guid): number; + toString(): string; + toString$1(format: string): string; + format(format: string, formatProvider: System.IFormatProvider): string; + toByteArray(): number[]; + getHashCode(): System.Guid; + $clone(to: System.Guid): System.Guid; + } + export interface GuidFunc extends Function { + prototype: Guid; + $ctor4: { + new (uuid: string): Guid + }; + $ctor1: { + new (b: number[]): Guid + }; + $ctor5: { + new (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): Guid + }; + $ctor3: { + new (a: number, b: number, c: number, d: number[]): Guid + }; + $ctor2: { + new (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): Guid + }; + ctor: { + new (): Guid + }; + empty: System.Guid; + parse(input: string): System.Guid; + parseExact(input: string, format: string): System.Guid; + tryParse(input: string, result: { v: System.Guid }): boolean; + tryParseExact(input: string, format: string, result: { v: System.Guid }): boolean; + newGuid(): System.Guid; + op_Equality(a: System.Guid, b: System.Guid): boolean; + op_Inequality(a: System.Guid, b: System.Guid): boolean; + } + var Guid: GuidFunc; + + export class TimeSpan implements IComparable, IComparable$1, IEquatable$1 { + static fromDays(value: number): TimeSpan; + static fromHours(value: number): TimeSpan; + static fromMilliseconds(value: number): TimeSpan; + static fromMinutes(value: number): TimeSpan; + static fromSeconds(value: number): TimeSpan; + static fromTicks(value: number): TimeSpan; + static getDefaultValue(): TimeSpan; + constructor(); + getTicks(): number; + getDays(): number; + getHours(): number; + getMilliseconds(): number; + getMinutes(): number; + getSeconds(): number; + getTotalDays(): number; + getTotalHours(): number; + getTotalMilliseconds(): number; + getTotalMinutes(): number; + getTotalSeconds(): number; + get12HourHour(): number; + add(ts: TimeSpan): TimeSpan; + subtract(ts: TimeSpan): TimeSpan; + duration(): TimeSpan; + negate(): TimeSpan; + compareTo(other: TimeSpan): number; + equals(other: TimeSpan): boolean; + format(str: string, provider?: System.Globalization.DateTimeFormatInfo): string; + toString(str: string, provider?: System.Globalization.DateTimeFormatInfo): string; + } + + export interface Random { + sample(): number; + internalSample(): number; + next(): number; + next$2(minValue: number, maxValue: number): number; + next$1(maxValue: number): number; + nextDouble(): number; + nextBytes(buffer: number[]): void; + } + export interface RandomFunc extends Function { + prototype: Random; + ctor: { + new (): Random + }; + $ctor1: { + new (seed: number): Random + }; + } + var Random: RandomFunc; + + module Collections { + export interface IEnumerable { + getEnumerator(): IEnumerator; + } + var IEnumerable: Function; + + export interface IEnumerator { + getCurrent(): any; + moveNext(): boolean; + reset(): void; + } + var IEnumerator: Function; + + export interface IEqualityComparer { + equals(x: any, y: any): boolean; + getHashCode(obj: any): number; + } + var IEqualityComparer: Function; + + export interface ICollection extends IEnumerable { + getCount(): number; + } + var ICollection: Function; + + module Generic { + export class KeyNotFoundException extends Exception { + constructor(message?: string, innerException?: Exception); + } + export interface IEnumerator$1 extends IEnumerator { + getCurrent(): T; + } + export function IEnumerator$1(T: { prototype: T }): { + prototype: IEnumerator$1; + } + + export interface IEnumerable$1 extends IEnumerable { + getEnumerator(): IEnumerator$1; + } + export function IEnumerable$1(T: { prototype: T }): { + prototype: IEnumerable$1; + } + + export interface ICollection$1 extends IEnumerable$1 { + getCount(): number; + add(item: T): void; + clear(): void; + contains(item: T): boolean; + remove(item: T): boolean; + } + export function ICollection$1(T: { prototype: T }): { + prototype: ICollection$1; + } + + export interface IEqualityComparer$1 extends IEqualityComparer { + equals(x: T, y: T): boolean; + getHashCode(obj: T): number; + } + export function IEqualityComparer$1(T: { prototype: T }): { + prototype: IEqualityComparer$1; + } + + export interface IDictionary$2 extends IEnumerable$1> { + get(key: TKey): TValue; + set(key: TKey, value: TValue): void; + getKeys(): ICollection$1; + getValues(): ICollection$1; + getCount(): number; + containsKey(key: TKey): boolean; + add(key: TKey, value: TValue): void; + remove(key: TKey): boolean; + tryGetValue(key: TKey, value: { v: TValue }): boolean; + } + export function IDictionary$2(TKey: { prototype: TKey }, TValue: { prototype: TValue }): { + prototype: IDictionary$2; + } + + export interface IList$1 extends ICollection$1 { + get(index: number): T; + set(index: number, value: T): void; + indexOf(item: T): number; + insert(index: number, item: T): void; + removeAt(index: number): void; + } + export function IList$1(T: { prototype: T }): { + prototype: IList$1; + } + + export interface IComparer$1 { + compare(x: T, y: T): number; + } + export function IComparer$1(T: { prototype: T }): { + prototype: IComparer$1; + } + + export interface EqualityComparer$1 extends IEqualityComparer$1 { + equals(x: T, y: T): boolean; + getHashCode(obj: T): number; + } + export function EqualityComparer$1(T: { prototype: T }): { + prototype: EqualityComparer$1; + new (): EqualityComparer$1; + } + + export interface Comparer$1 extends IComparer$1 { + compare(x: T, y: T): number; + } + export function Comparer$1(T: { prototype: T }): { + prototype: Comparer$1; + new (fn: { (x: T, y: T): number }): Comparer$1; + } + + export interface KeyValuePair$2 { + key: TKey; + value: TValue; + } + export function KeyValuePair$2(TKey: { prototype: TKey }, TValue: { prototype: TValue }): { + prototype: KeyValuePair$2; + new (key: TKey, value: TValue): KeyValuePair$2; + } + + export interface Dictionary$2 extends IDictionary$2 { + getKeys(): ICollection$1; + getValues(): ICollection$1; + clear(): void; + containsKey(key: TKey): boolean; + containsValue(value: TValue): boolean; + get(key: TKey): TValue; + set(key: TKey, value: TValue, add?: boolean): void; + add(key: TKey, value: TValue): void; + remove(key: TKey): boolean; + getCount(): number; + getComparer(): IEqualityComparer$1; + tryGetValue(key: TKey, value: { v: TValue }): boolean; + getEnumerator(): IEnumerator$1>; + } + export function Dictionary$2(TKey: { prototype: TKey }, TValue: { prototype: TValue }): { + prototype: Dictionary$2; + new (): Dictionary$2; + new (obj: Dictionary$2, comparer?: IEqualityComparer$1): Dictionary$2; + new (obj: any, comparer?: IEqualityComparer$1): Dictionary$2; + } + + export interface List$1 extends ICollection$1, IList$1 { + getCount(): number; + get(index: number): T; + set(index: number, value: T): void; + add(value: T): void; + addRange(items: T[]); + addRange(items: IEnumerable$1); + clear(): void; + indexOf(item: T, startIndex?: number): number; + insertRange(index: number, items: IEnumerable$1): void; + contains(item: T): boolean; + getEnumerator(): IEnumerator$1; + getRange(index: number, count?: number): List$1; + getRange(): List$1; + insert(index: number, item: T): void; + join(delimeter?: string): string; + lastIndexOf(item: T, fromIndex?: number): number; + remove(item: T): boolean; + removeAt(index: number): void; + removeRange(index: number, count: number): void; + reverse(): void; + slice(start: number, end: number): void; + sort(comparison?: { (x: T, y: T): number }); + splice(start: number, deleteCount: number, itemsToInsert?: IEnumerable$1): void; + splice(start: number, deleteCount: number, itemsToInsert?: T[]): void; + unshift(): void; + toArray(): T[]; + } + export function List$1(T: { prototype: T }): { + prototype: List$1; + new (): List$1; + new (obj: T[]): List$1; + new (obj: IEnumerable$1): List$1; + } + } + + module ObjectModel { + export interface ReadOnlyCollection$1 extends System.Collections.Generic.List$1 { + } + export function ReadOnlyCollection$1(T: { prototype: T }): { + prototype: ReadOnlyCollection$1; + new (obj: T[]): ReadOnlyCollection$1; + new (obj: System.Collections.Generic.IEnumerable$1): ReadOnlyCollection$1; + } + } + } + + module ComponentModel { + export interface INotifyPropertyChanged { + propertyChanged(sender: any, e: PropertyChangedEventArgs): void; + } + var INotifyPropertyChanged: Function; + + export class PropertyChangedEventArgs { + constructor(propertyName: string); + propertyName: string; + } + } + + module Globalization { + export class CultureNotFoundException extends ArgumentException { + constructor(paramName: string, invalidCultureName?: string, message?: string, innerException?: Exception); + getInvalidCultureName(): string; + } + + export class DateTimeFormatInfo implements IFormatProvider, ICloneable { + invariantInfo: DateTimeFormatInfo; + clone(): any; + getFormat(type: any): any; + getAbbreviatedDayName(dayofweek: number): string; + getAbbreviatedMonthName(month: number): string; + getAllDateTimePatterns(format: string, returnNull?: boolean): string[]; + getDayName(dayofweek: number): string; + getMonthName(month: number): string; + getShortestDayName(dayofweek: number): string; + } + + export class NumberFormatInfo implements IFormatProvider, ICloneable { + invariantInfo: NumberFormatInfo; + clone(): any; + getFormat(type: any): any; + } + + export class CultureInfo implements IFormatProvider, ICloneable { + constructor(name: string); + invariantCulture: CultureInfo; + clone(): any; + getFormat(type: any): any; + static getCurrentCulture(): CultureInfo; + static setCurrentCulture(culture: CultureInfo): void; + static getCultureInfo(name: string): CultureInfo; + static getCultures(): CultureInfo[]; + } + } + + module Text { + export class StringBuilder { + constructor(); + constructor(value: string); + constructor(value: string, capacity: number); + constructor(value: string, startIndex: number, length: number); + getLength(): number; + getCapacity(): number; + setCapacity(value: number): void; + toString(startIndex?: number, length?: number): string; + append(value: string): StringBuilder; + append(value: string, count: number): StringBuilder; + append(value: string, startIndex: number, count: number): StringBuilder; + appendFormat(format: string, ...args: string[]): StringBuilder; + clear(): void; + appendLine(): StringBuilder; + equals(sb: StringBuilder): boolean; + remove(startIndex: number, length: number): StringBuilder; + insert(index: number, value: string, count?: number): StringBuilder; + replace(oldValue: string, newValue: string, startIndex?: number, count?: number): StringBuilder; + } + } + + module Threading { + module Tasks { + export class Task { + constructor(action: Function, state?: any); + static delay(delay: number, state?: any): Task; + static fromResult(result: any): Task; + static run(fn: Function): Task; + static whenAll(tasks: Task[]): Task; + static whenAny(tasks: Task[]): Task; + static fromCallback(target: any, method: string, ...otherArguments: any[]): Task; + static fromCallbackResult(target: any, method: string, resultHandler: Function, ...otherArguments: any[]): Task; + static fromCallbackOptions(target: any, method: string, name: string, ...otherArguments: any[]): Task; + static fromPromise(promise: Bridge.IPromise, handler: Function): Task; + continueWith(continuationAction: Function): Task; + start(): void; + complete(result?: any): boolean; + isCanceled(): boolean; + isCompleted(): boolean; + isFaulted(): boolean; + getResult(): T; + setCanceled(): void; + setResult(result: any): void; + setError(error: Exception): void; + } + } + } +} + +declare module Bridge.Linq { + interface EnumerableStatic { + Utils: { + createLambda(expression: any): (...params: any[]) => any; + createEnumerable(getEnumerator: () => System.Collections.IEnumerator): Enumerable; + createEnumerator(initialize: () => void, tryGetNext: () => boolean, dispose: () => void): System.Collections.IEnumerator; + extendTo(type: any): void; + }; + choice(...params: any[]): Enumerable; + cycle(...params: any[]): Enumerable; + empty(): Enumerable; + from(): Enumerable; + from(obj: Enumerable): Enumerable; + from(obj: string): Enumerable; + from(obj: number): Enumerable; + from(obj: { length: number;[x: number]: any; }): Enumerable; + from(obj: any): Enumerable; + make(element: any): Enumerable; + matches(input: string, pattern: RegExp): Enumerable; + matches(input: string, pattern: string, flags?: string): Enumerable; + range(start: number, count: number, step?: number): Enumerable; + rangeDown(start: number, count: number, step?: number): Enumerable; + rangeTo(start: number, to: number, step?: number): Enumerable; + repeat(element: any, count?: number): Enumerable; + repeatWithFinalize(initializer: () => any, finalizer: (element: any) => void): Enumerable; + generate(func: () => any, count?: number): Enumerable; + toInfinity(start?: number, step?: number): Enumerable; + toNegativeInfinity(start?: number, step?: number): Enumerable; + unfold(seed: any, func: (value: any) => any): Enumerable; + defer(enumerableFactory: () => Enumerable): Enumerable; + } + + interface Enumerable { + constructor(getEnumerator: () => System.Collections.IEnumerator): Enumerable; + getEnumerator(): System.Collections.IEnumerator; + + // Extension Methods + traverseBreadthFirst(func: (element: any) => Enumerable, resultSelector?: (element: any, nestLevel: number) => any): Enumerable; + traverseDepthFirst(func: (element: any) => Enumerable, resultSelector?: (element: any, nestLevel: number) => any): Enumerable; + flatten(): Enumerable; + pairwise(selector: (prev: any, current: any) => any): Enumerable; + scan(func: (prev: any, current: any) => any): Enumerable; + scan(seed: any, func: (prev: any, current: any) => any): Enumerable; + select(selector: (element: any, index: number) => any): Enumerable; + selectMany(collectionSelector: (element: any, index: number) => any[], resultSelector?: (outer: any, inner: any) => any): Enumerable; + selectMany(collectionSelector: (element: any, index: number) => Enumerable, resultSelector?: (outer: any, inner: any) => any): Enumerable; + selectMany(collectionSelector: (element: any, index: number) => { length: number;[x: number]: any; }, resultSelector?: (outer: any, inner: any) => any): Enumerable; + where(predicate: (element: any, index: number) => boolean): Enumerable; + choose(selector: (element: any, index: number) => any): Enumerable; + ofType(type: any): Enumerable; + zip(second: any[], resultSelector: (first: any, second: any, index: number) => any): Enumerable; + zip(second: Enumerable, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + zip(second: { length: number;[x: number]: any; }, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + zip(...params: any[]): Enumerable; // last one is selector + merge(second: any[], resultSelector: (first: any, second: any, index: number) => any): Enumerable; + merge(second: Enumerable, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + merge(second: { length: number;[x: number]: any; }, resultSelector: (first: any, second: any, index: number) => any): Enumerable; + merge(...params: any[]): Enumerable; // last one is selector + join(inner: Enumerable, outerKeySelector: (outer: any) => any, innerKeySelector: (inner: any) => any, resultSelector: (outer: any, inner: any) => any, compareSelector?: (obj: any) => any): Enumerable; + groupJoin(inner: Enumerable, outerKeySelector: (outer: any) => any, innerKeySelector: (inner: any) => any, resultSelector: (outer: any, inner: any) => any, compareSelector?: (obj: any) => any): Enumerable; + all(predicate: (element: any) => boolean): boolean; + any(predicate?: (element: any) => boolean): boolean; + isEmpty(): boolean; + concat(...sequences: any[]): Enumerable; + insert(index: number, second: any[]): Enumerable; + insert(index: number, second: Enumerable): Enumerable; + insert(index: number, second: { length: number;[x: number]: any; }): Enumerable; + alternate(alternateValue: any): Enumerable; + alternate(alternateSequence: any[]): Enumerable; + alternate(alternateSequence: Enumerable): Enumerable; + contains(value: any, compareSelector: (element: any) => any): Enumerable; + contains(value: any): Enumerable; + defaultIfEmpty(defaultValue?: any): Enumerable; + distinct(compareSelector?: (element: any) => any): Enumerable; + distinctUntilChanged(compareSelector: (element: any) => any): Enumerable; + except(second: any[], compareSelector?: (element: any) => any): Enumerable; + except(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + except(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + intersect(second: any[], compareSelector?: (element: any) => any): Enumerable; + intersect(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + intersect(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + sequenceEqual(second: any[], compareSelector?: (element: any) => any): Enumerable; + sequenceEqual(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + sequenceEqual(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + union(second: any[], compareSelector?: (element: any) => any): Enumerable; + union(second: { length: number;[x: number]: any; }, compareSelector?: (element: any) => any): Enumerable; + union(second: Enumerable, compareSelector?: (element: any) => any): Enumerable; + orderBy(keySelector: (element: any) => any): OrderedEnumerable; + orderByDescending(keySelector: (element: any) => any): OrderedEnumerable; + reverse(): Enumerable; + shuffle(): Enumerable; + weightedSample(weightSelector: (element: any) => any): Enumerable; + groupBy(keySelector: (element: any) => any, elementSelector?: (element: any) => any, resultSelector?: (key: any, element: any) => any, compareSelector?: (element: any) => any): Enumerable; + partitionBy(keySelector: (element: any) => any, elementSelector?: (element: any) => any, resultSelector?: (key: any, element: any) => any, compareSelector?: (element: any) => any): Enumerable; + buffer(count: number): Enumerable; + aggregate(func: (prev: any, current: any) => any): any; + aggregate(seed: any, func: (prev: any, current: any) => any, resultSelector?: (last: any) => any): any; + average(selector?: (element: any) => any): number; + count(predicate?: (element: any, index: number) => boolean): number; + max(selector?: (element: any) => any): number; + min(selector?: (element: any) => any): number; + maxBy(keySelector: (element: any) => any): any; + minBy(keySelector: (element: any) => any): any; + sum(selector?: (element: any) => any): number; + elementAt(index: number): any; + elementAtOrDefault(index: number, defaultValue?: any): any; + first(predicate?: (element: any, index: number) => boolean): any; + firstOrDefault(predicate?: (element: any, index: number) => boolean, defaultValue?: any): any; + last(predicate?: (element: any, index: number) => boolean): any; + lastOrDefault(predicate?: (element: any, index: number) => boolean, defaultValue?: any): any; + single(predicate?: (element: any, index: number) => boolean): any; + singleOrDefault(predicate?: (element: any, index: number) => boolean, defaultValue?: any): any; + skip(count: number): Enumerable; + skipWhile(predicate: (element: any, index: number) => boolean): Enumerable; + take(count: number): Enumerable; + takeWhile(predicate: (element: any, index: number) => boolean): Enumerable; + takeExceptLast(count?: number): Enumerable; + takeFromLast(count: number): Enumerable; + indexOf(item: any): number; + indexOf(predicate: (element: any, index: number) => boolean): number; + lastIndexOf(item: any): number; + lastIndexOf(predicate: (element: any, index: number) => boolean): number; + asEnumerable(): Enumerable; + toArray(): any[]; + toLookup(keySelector: (element: any) => any, elementSelector?: (element: any) => any, compareSelector?: (element: any) => any): Lookup; + toObject(keySelector: (element: any) => any, elementSelector?: (element: any) => any): Object; + toDictionary(keySelector: (element: any) => any, elementSelector?: (element: any) => any, compareSelector?: (element: any) => any): Dictionary; + toJSONString(replacer: (key: string, value: any) => any): string; + toJSONString(replacer: any[]): string; + toJSONString(replacer: (key: string, value: any) => any, space: any): string; + toJSONString(replacer: any[], space: any): string; + toJoinedString(separator?: string, selector?: (element: any, index: number) => any): string; + doAction(action: (element: any, index: number) => void): Enumerable; + doAction(action: (element: any, index: number) => boolean): Enumerable; + forEach(action: (element: any, index: number) => void): void; + forEach(action: (element: any, index: number) => boolean): void; + write(separator?: string, selector?: (element: any) => any): void; + writeLine(selector?: (element: any) => any): void; + force(): void; + letBind(func: (source: Enumerable) => any[]): Enumerable; + letBind(func: (source: Enumerable) => { length: number;[x: number]: any; }): Enumerable; + letBind(func: (source: Enumerable) => Enumerable): Enumerable; + share(): DisposableEnumerable; + memoize(): DisposableEnumerable; + catchError(handler: (exception: any) => void): Enumerable; + finallyAction(finallyAction: () => void): Enumerable; + log(selector?: (element: any) => void): Enumerable; + trace(message?: string, selector?: (element: any) => void): Enumerable; + } + + interface OrderedEnumerable extends Enumerable { + createOrderedEnumerable(keySelector: (element: any) => any, descending: boolean): OrderedEnumerable; + thenBy(keySelector: (element: any) => any): OrderedEnumerable; + thenByDescending(keySelector: (element: any) => any): OrderedEnumerable; + } + + interface DisposableEnumerable extends Enumerable { + dispose(): void; + } + + interface Dictionary { + add(key: any, value: any): void; + get(key: any): any; + set(key: any, value: any): boolean; + contains(key: any): boolean; + clear(): void; + remove(key: any): void; + count(): number; + toEnumerable(): Enumerable; // Enumerable + } + + interface Lookup { + count(): number; + get(key: any): Enumerable; + contains(key: any): boolean; + toEnumerable(): Enumerable; // Enumerable + } + + interface Grouping extends Enumerable { + key(): any; + } + + var Enumerable: EnumerableStatic; +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/bridge.min.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/bridge.min.js new file mode 100644 index 000000000..72d0ec7df --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/Scripts/bridge.min.js @@ -0,0 +1,8 @@ +/** + * @version : 15.7.0 - Bridge.NET + * @author : Object.NET, Inc. http://bridge.net/ + * @date : 2017-01-16 + * @copyright : Copyright 2008-2017 Object.NET, Inc. http://object.net/ + * @license : See license.txt and https://github.com/bridgedotnet/Bridge/blob/master/LICENSE.md + */ +(function(n){"use strict";var bt={global:n,emptyFn:function(){},identity:function(n){return n},geti:function(n,t,i){return Bridge.hasValue(n[t])?t:i},safe:function(n){try{return n()}catch(t){}return!1},literal:function(n,t){return t.$getType=function(){return n},t},isPlainObject:function(n){if(typeof n=="object"&&n!==null){if(typeof Object.getPrototypeOf=="function"){var t=Object.getPrototypeOf(n);return t===Object.prototype||t===null}return Object.prototype.toString.call(n)==="[object Object]"}return!1},toPlain:function(n){var i,t,r,u,f;if(!n||Bridge.isPlainObject(n)||typeof n!="object")return n;if(typeof n.toJSON=="function")return n.toJSON();if(Bridge.isArray(n)){for(i=[],t=0;t0&&t.length-u-1>0&&!isNaN(parseInt(t.substr(u+1)));h&&(u=t.substring(0,u-1).lastIndexOf("$"));u>0&&u!==t.length-1&&(e=t.substring(0,u)+"get"+t.substr(u+1),o=t.substring(0,u)+"set"+t.substr(u+1));n[e]=function(n,t,i){return i?function(){return t[n]}:function(){return this[n]}}(t,n,r);n[o]=function(n,t,i){return i?function(i){t[n]=i}:function(t){this[n]=t}}(t,n,r)},event:function(n,t,i,r){n[t]=i;var s=t.charAt(0)==="$",f=s?t.slice(1):t,e="add"+f,o="remove"+f,u=t.lastIndexOf("$"),h=u>0&&t.length-u-1>0&&!isNaN(parseInt(t.substr(u+1)));h&&(u=t.substring(0,u-1).lastIndexOf("$"));u>0&&u!==t.length-1&&(e=t.substring(0,u)+"add"+t.substr(u+1),o=t.substring(0,u)+"remove"+t.substr(u+1));n[e]=function(n,t,i){return i?function(i){t[n]=Bridge.fn.combine(t[n],i)}:function(t){this[n]=Bridge.fn.combine(this[n],t)}}(t,n,r);n[o]=function(n,t,i){return i?function(i){t[n]=Bridge.fn.remove(t[n],i)}:function(t){this[n]=Bridge.fn.remove(this[n],t)}}(t,n,r)},createInstance:function(n,t){return n===System.Decimal?System.Decimal.Zero:n===System.Int64?System.Int64.Zero:n===System.UInt64?System.UInt64.Zero:n===System.Double||n===System.Single||n===System.Byte||n===System.SByte||n===System.Int16||n===System.UInt16||n===System.Int32||n===System.UInt32||n===Bridge.Int?0:typeof n.createInstance=="function"?n.createInstance():typeof n.getDefaultValue=="function"?n.getDefaultValue():n===Boolean?!1:n===Date?new Date(0):n===Number?0:n===String?"":n&&n.$literal?n.ctor():t&&t.length>0?Bridge.Reflection.applyConstructor(n,t):new n},clone:function(n){if(Bridge.isArray(n))return System.Array.clone(n);if(Bridge.isString(n))return n;var t;return Bridge.isFunction(n[t="System$ICloneable$clone"])?n[t]():Bridge.is(n,System.ICloneable)?n.clone():null},copy:function(n,t,i,r){typeof i=="string"&&(i=i.split(/[,;\s]+/));for(var u,f=0,e=i?i.length:0;f=0;if(Bridge.isArray(n,u))return System.Array.is(n,t);if(u===String)return System.String.is(n,t)}return i!==!0&&t.$is?t.$is(n):t.$literal&&Bridge.isPlainObject(n)?n.$getType?Bridge.Reflection.isAssignableFrom(t,n.$getType()):!0:!1}if(f=typeof t,f==="boolean")return t;if(f==="string"&&(t=Bridge.unroll(t)),f==="function"&&Bridge.getType(n).prototype instanceof t)return!0;if(i!==!0){if(typeof t.$is=="function")return t.$is(n);if(typeof t.isAssignableFrom=="function")return t.isAssignableFrom(Bridge.getType(n))}return Bridge.isArray(n)?System.Array.is(n,t):f==="object"&&(u===t||n instanceof t)},as:function(n,t,i){return Bridge.is(n,t,!1,i)?n:null},cast:function(n,t,i){if(n==null)return n;var r=Bridge.is(n,t,!1,i)?n:null;if(r===null)throw new System.InvalidCastException("Unable to cast type "+(n?Bridge.getTypeName(n):"'null'")+" to type "+Bridge.getTypeName(t));return r},apply:function(n,t){for(var u=Bridge.getPropertyNames(t,!0),i,r=0;r=0||i.$isArray:!1},isFunction:function(n){return typeof n=="function"},isDate:function(n){return Object.prototype.toString.call(n)==="[object Date]"},isNull:function(n){return n===null||n===undefined},isBoolean:function(n){return typeof n=="boolean"},isNumber:function(n){return typeof n=="number"&&isFinite(n)},isString:function(n){return typeof n=="string"},unroll:function(n){var r=n.split("."),t=Bridge.global[r[0]],i=1;for(i;i-1||Bridge.$$rightChain.indexOf(t)>-1)return!1;for(var i in t)if(t.hasOwnProperty(i)!==n.hasOwnProperty(i)||typeof t[i]!=typeof n[i])return!1;for(i in n){if(t.hasOwnProperty(i)!==n.hasOwnProperty(i)||typeof n[i]!=typeof t[i])return!1;if(n[i]===t[i])continue;else if(typeof n[i]=="object"){if(Bridge.$$leftChain.push(n),Bridge.$$rightChain.push(t),!Bridge.deepEquals(n[i],t[i]))return!1;Bridge.$$leftChain.pop();Bridge.$$rightChain.pop()}else if(!Bridge.equals(n[i],t[i]))return!1}return!0}return Bridge.equals(n,t)},compare:function(n,t,i,r){if(Bridge.isDefined(n,!0)){if(Bridge.isNumber(n)||Bridge.isString(n)||Bridge.isBoolean(n))return Bridge.isString(n)&&!Bridge.hasValue(t)?1:nt?1:0;if(Bridge.isDate(n))return Bridge.compare(n.valueOf(),t.valueOf())}else{if(i)return 0;throw new System.NullReferenceException;}var u;if(r&&Bridge.isFunction(n[u="System$IComparable$1$"+Bridge.getTypeAlias(r)+"$compareTo"])||Bridge.isFunction(n[u="System$IComparable$compareTo"]))return n[u](t);if(Bridge.isFunction(n.compareTo))return n.compareTo(t);if(r&&Bridge.isFunction(t[u="System$IComparable$1$"+Bridge.getTypeAlias(r)+"$compareTo"])||Bridge.isFunction(t[u="System$IComparable$compareTo"]))return-t[u](n);if(Bridge.isFunction(t.compareTo))return-t.compareTo(n);if(i)return 0;throw new System.Exception("Cannot compare items");},equalsT:function(n,t,i){if(Bridge.isDefined(n,!0)){if(Bridge.isNumber(n)||Bridge.isString(n)||Bridge.isBoolean(n))return n===t;if(Bridge.isDate(n))return n.valueOf()===t.valueOf()}else throw new System.NullReferenceException;var r;return i&&n!=null&&Bridge.isFunction(n[r="System$IEquatable$1$"+Bridge.getTypeAlias(i)+"$equalsT"])?n[r](t):i&&t!=null&&Bridge.isFunction(t[r="System$IEquatable$1$"+Bridge.getTypeAlias(i)+"$equalsT"])?t[r](n):n.equalsT?n.equalsT(t):t.equalsT(n)},format:function(n,t,i){if(Bridge.isNumber(n))return Bridge.Int.format(n,t,i);if(Bridge.isDate(n))return Bridge.Date.format(n,t,i);var r;return Bridge.isFunction(n[r="System$IFormattable$format"])?n[r](t,i):n.format(t,i)},getType:function(n,t){if(n==null)throw new System.NullReferenceException("instance is null");if(t&&Bridge.Reflection.getBaseType(t)===Object)return t;if(typeof n=="number")return!isNaN(n)&&isFinite(n)&&Math.floor(n,0)===n?System.Int32:System.Double;if(n.$type)return n.$type;if(n.$getType)return n.$getType();try{return n.constructor}catch(i){return Object}},isLower:function(n){var t=String.fromCharCode(n);return t===t.toLowerCase()&&t!==t.toUpperCase()},isUpper:function(n){var t=String.fromCharCode(n);return t!==t.toLowerCase()&&t===t.toUpperCase()},coalesce:function(n,t){return Bridge.hasValue(n)?n:t},fn:{equals:function(n){return this===n?!0:n==null||this.constructor!==n.constructor?!1:this.equals===n.equals&&this.$method===n.$method&&this.$scope===n.$scope},call:function(n,t){var i=Array.prototype.slice.call(arguments,2);return n=n||Bridge.global,n[t].apply(n,i)},makeFn:function(n,t){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(){return n.apply(this,arguments)};case 2:return function(){return n.apply(this,arguments)};case 3:return function(){return n.apply(this,arguments)};case 4:return function(){return n.apply(this,arguments)};case 5:return function(){return n.apply(this,arguments)};case 6:return function(){return n.apply(this,arguments)};case 7:return function(){return n.apply(this,arguments)};case 8:return function(){return n.apply(this,arguments)};case 9:return function(){return n.apply(this,arguments)};case 10:return function(){return n.apply(this,arguments)};case 11:return function(){return n.apply(this,arguments)};case 12:return function(){return n.apply(this,arguments)};case 13:return function(){return n.apply(this,arguments)};case 14:return function(){return n.apply(this,arguments)};case 15:return function(){return n.apply(this,arguments)};case 16:return function(){return n.apply(this,arguments)};case 17:return function(){return n.apply(this,arguments)};case 18:return function(){return n.apply(this,arguments)};case 19:return function(){return n.apply(this,arguments)};default:return function(){return n.apply(this,arguments)}}},cacheBind:function(n,t,i,r){return Bridge.fn.bind(n,t,i,r,!0)},bind:function(n,t,i,r,u){var e,f;if(t&&t.$method===t&&t.$scope===n)return t;if(n&&u&&n.$$bind)for(e=0;e=0;i--){for(o=!1,u=0;u2147483647)throw new System.ArgumentOutOfRangeException("timeout","Number must be either non-negative and less than or equal to Int32.MaxValue or -1");n==-1&&(n=2147483647);for(var i=(new Date).getTime();(new Date).getTime()-i2147483647)break},getMetadata:function(n){return n.$getMetadata?n.$getMetadata():n.$metadata}},nt,s,at,o,vt,yt,pt,k,wt,t;n.Bridge=bt;n.Bridge.caller=[];n.System={};n.System.Diagnostics={};n.System.Diagnostics.Contracts={};n.System.Threading={};nt={is:function(n,t){return Bridge.isString(n)?n.constructor===t||n instanceof t?!0:t===System.ICloneable||t===System.Collections.IEnumerable||t===System.Collections.Generic.IEnumerable$1(System.Char)||t===System.IComparable$1(String)||t===System.IEquatable$1(String)?!0:!1:!1},lastIndexOf:function(n,t,i,r){var u=n.lastIndexOf(t,i);return u=f;u--)if(t.indexOf(n.charAt(u))>=0)return u;return-1},isNullOrWhiteSpace:function(n){return n?System.Char.isWhiteSpace(n):!0},isNullOrEmpty:function(n){return!n},fromCharCount:function(n,t){if(t>=0)return String(Array(t+1).join(String.fromCharCode(n)));throw new System.ArgumentOutOfRangeException("count","cannot be less than zero");},format:function(n){return System.String._format(System.Globalization.CultureInfo.getCurrentCulture(),n,Array.prototype.slice.call(arguments,1))},formatProvider:function(n,t){return System.String._format(n,t,Array.prototype.slice.call(arguments,2))},_format:function(n,t,i){var u=this,f=i,r=this.decodeBraceSequence;return t.replace(/(\{+)((\d+|[a-zA-Z_$]\w+(?:\.[a-zA-Z_$]\w+|\[\d+\])*)(?:\,(-?\d*))?(?:\:([^\}]*))?)(\}+)|(\{+)|(\}+)/g,function(t,i,e,o,s,h,c,l,a){return l?r(l):a?r(a):i.length%2==0||c.length%2==0?r(i)+e+r(c):r(i,!0)+u.handleElement(n,o,s,h,f)+r(c,!0)})},handleElement:function(n,t,i,r,u){var f;if(t=parseInt(t,10),t>u.length-1)throw new System.FormatException("Input string was not in a correct format.");return f=u[t],f==null&&(f=""),f=r&&Bridge.is(f,System.IFormattable)?Bridge.format(f,r,n):""+f,i&&(i=parseInt(i,10),Bridge.isNumber(i)||(i=null)),System.String.alignString(f.toString(),i)},decodeBraceSequence:function(n,t){return n.substr(0,(n.length+(t?0:1))/2)},alignString:function(n,t,i,r,u){if(n==null||!t)return n;if(i||(i=" "),Bridge.isNumber(i)&&(i=String.fromCharCode(i)),r||(r=t<0?1:2),t=Math.abs(t),u&&n.length>t&&(n=n.substring(0,t)),t+1>=n.length)switch(r){case 2:n=Array(t+1-n.length).join(i)+n;break;case 3:var f=t-n.length,e=Math.ceil(f/2),o=f-e;n=Array(o+1).join(i)+n+Array(e+1).join(i);break;case 1:default:n=n+Array(t+1-n.length).join(i)}return n},startsWith:function(n,t){return t.length?t.length>n.length?!1:(t=System.String.escape(t),n.match("^"+t)!==null):!0},endsWith:function(n,t){return t.length?t.length>n.length?!1:(t=System.String.escape(t),n.match(t+"$")!==null):!0},contains:function(n,t){if(t==null)throw new System.ArgumentNullException;return n==null?!1:n.indexOf(t)>-1},indexOfAny:function(n,t){var i,r,e,u,o,f;if(t==null)throw new System.ArgumentNullException;if(n==null||n==="")return-1;if(i=arguments.length>2?arguments[2]:0,i<0)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero");if(r=arguments.length>3?arguments[3]:n.length-i,r<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");if(r>n.length-i)throw new System.ArgumentOutOfRangeException("Index and length must refer to a location within the string");for(e=n.substr(i,r),u=0;u-1)return f+i;return-1},indexOf:function(n,t){var i,u,f,r;if(t==null)throw new System.ArgumentNullException;if(n==null||n==="")return-1;if(i=arguments.length>2?arguments[2]:0,i<0||i>n.length)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero and must refer to a location within the string");if(t==="")return arguments.length>2?i:0;if(u=arguments.length>3?arguments[3]:n.length-i,u<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");if(u>n.length-i)throw new System.ArgumentOutOfRangeException("Index and length must refer to a location within the string");return(f=n.substr(i,u),r=arguments.length===5&&arguments[4]%2!=0?f.toLocaleUpperCase().indexOf(t.toLocaleUpperCase()):f.indexOf(t),r>-1)?arguments.length===5?System.String.compare(t,f.substr(r,t.length),arguments[4])===0?r+i:-1:r+i:-1},equals:function(){return System.String.compare.apply(this,arguments)===0},compare:function(n,t){if(n==null)return t==null?0:-1;if(t==null)return 1;if(arguments.length>=3)if(Bridge.isBoolean(arguments[2])){if(arguments[2]&&(n=n.toLocaleUpperCase(),t=t.toLocaleUpperCase()),arguments.length===4)return n.localeCompare(t,arguments[3].name)}else switch(arguments[2]){case 1:return n.localeCompare(t,System.Globalization.CultureInfo.getCurrentCulture().name,{sensitivity:"accent"});case 2:return n.localeCompare(t,System.Globalization.CultureInfo.invariantCulture.name);case 3:return n.localeCompare(t,System.Globalization.CultureInfo.invariantCulture.name,{sensitivity:"accent"});case 4:return n===t?0:n>t?1:-1;case 5:return n.toUpperCase()===t.toUpperCase()?0:n.toUpperCase()>t.toUpperCase()?1:-1}return n.localeCompare(t)},toCharArray:function(n,t,i){var u,r;if(t<0||t>n.length||t>n.length-i)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero and must refer to a location within the string");if(i<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");for(Bridge.hasValue(t)||(t=0),Bridge.hasValue(i)||(i=n.length),u=[],r=t;r0?t.substring(0,n)+i+t.substring(n,t.length):i+t},remove:function(n,t,i){if(n==null)throw new System.NullReferenceException;if(t<0)throw new System.ArgumentOutOfRangeException("startIndex","StartIndex cannot be less than zero");if(i!=null){if(i<0)throw new System.ArgumentOutOfRangeException("count","Count cannot be less than zero");if(i>n.length-t)throw new System.ArgumentOutOfRangeException("count","Index and count must refer to a location within the string");}else if(t>=n.length)throw new System.ArgumentOutOfRangeException("startIndex","startIndex must be less than length of string");return i==null||t+i>n.length?n.substr(0,t):n.substr(0,t)+n.substr(t+i)},split:function(n,t,i,r){for(var o=!Bridge.hasValue(t)||t.length===0?new RegExp("\\s","g"):new RegExp(t.map(System.String.escape).join("|"),"g"),f=[],e,u=0;;u=o.lastIndex)if(e=o.exec(n)){if(r!==1||e.index>u){if(f.length===i-1)return f.push(n.substr(u)),f;f.push(n.substring(u,e.index))}}else return(r!==1||u!==n.length)&&f.push(n.substr(u)),f},trimEnd:function(n,t){return n.replace(t?new RegExp("["+System.String.escape(String.fromCharCode.apply(null,t))+"]+$"):/\s*$/,"")},trimStart:function(n,t){return n.replace(t?new RegExp("^["+System.String.escape(String.fromCharCode.apply(null,t))+"]+"):/^\s*/,"")},trim:function(n,t){return System.String.trimStart(System.String.trimEnd(n,t),t)},concat:function(){for(var t,i="",n=0;n=0;e--){v=c[e].trim();h=!1;for(u in f)if(s.nameEquals(u,v,i)){l|=f[u];h=!0;break}if(!h){a=!1;break}}if(a)return l}else for(u in f)if(s.nameEquals(u,t,i))return f[u];if(r!==!0)throw new System.ArgumentException("Invalid Enumeration Value");return null},toString:function(n,t,i){var u,e,f,r;if(n===Number)return t.toString();if(System.Enum.checkEnumType(n),u=n,e=System.Int64.is64Bit(t),(n.prototype&&n.prototype.$flags||i===!0)&&t!==0){f=[];for(r in u)(e&&System.Int64.is64Bit(u[r])?!u[r].and(t).isZero():u[r]&t)&&f.push(s.toName(r));return f.length?f.join(", "):t.toString()}for(r in u)if(e&&System.Int64.is64Bit(u[r])?u[r].eq(t):u[r]===t)return s.toName(r);return t.toString()},getValues:function(n){var r,t,i;System.Enum.checkEnumType(n);r=[];t=n;for(i in t)t.hasOwnProperty(i)&&i.indexOf("$")<0&&typeof t[i]!="function"&&r.push(t[i]);return r.sort(function(n,t){return n-t})},format:function(n,t,i){System.Enum.checkEnumType(n);var r;if(!Bridge.hasValue(t)&&(r="value")||!Bridge.hasValue(i)&&(r="format"))throw new System.ArgumentNullException(r);switch(i){case"G":case"g":return System.Enum.toString(n,t);case"x":case"X":return t.toString(16);case"d":case"D":return t.toString();case"f":case"F":return System.Enum.toString(n,t,!0);default:throw new System.FormatException;}},getNames:function(n){var r,i,t;System.Enum.checkEnumType(n);r=[];i=n;for(t in i)i.hasOwnProperty(t)&&t.indexOf("$")<0&&typeof i[t]!="function"&&r.push([s.toName(t),i[t]]);return r.sort(function(n,t){return n[1]-t[1]}).map(function(n){return n[0]})},getName:function(n,t){var i,r;if(t==null)throw new System.ArgumentNullException("value");if(!(typeof t=="number"&&Math.floor(t,0)===t))throw new System.ArgumentException("Argument must be integer","value");System.Enum.checkEnumType(n);i=n;for(r in i)if(i[r]===t)return r;return null},hasFlag:function(n,t){return!!(n&t)},isDefined:function(n,t){var i,u,r;System.Enum.checkEnumType(n);i=n;u=Bridge.isString(t);for(r in i)if(u?s.nameEquals(r,t,!1):i[r]===t)return!0;return!1},tryParse:function(n,t,i,r){return(i.v=0,i.v=s.parse(n,t,r,!0),i.v==null)?!1:!0}};System.Enum=s;var i=function(n){return n.test(navigator.userAgent.toLowerCase())},tt=Bridge.global.document&&Bridge.global.document.compatMode==="CSS1Compat",v=function(n,t){var i;return n&&(i=t.exec(navigator.userAgent.toLowerCase()))?parseFloat(i[1]):0},r=Bridge.global.document?Bridge.global.document.documentMode:null,p=i(/opera/),kt=p&&i(/version\/10\.5/),it=i(/\bchrome\b/),d=i(/webkit/),c=!it&&i(/safari/),dt=c&&i(/applewebkit\/4/),gt=c&&i(/version\/3/),ni=c&&i(/version\/4/),ti=c&&i(/version\/5\.0/),ii=c&&i(/version\/5/),u=!p&&(i(/msie/)||i(/trident/)),e=u&&(i(/msie 7/)&&r!==8&&r!==9&&r!==10||r===7),h=u&&(i(/msie 8/)&&r!==7&&r!==9&&r!==10||r===8),l=u&&(i(/msie 9/)&&r!==7&&r!==8&&r!==10||r===9),w=u&&(i(/msie 10/)&&r!==7&&r!==8&&r!==9||r===10),rt=u&&(i(/trident\/7\.0/)&&r!==7&&r!==8&&r!==9&&r!==10||r===11),f=u&&i(/msie 6/),y=!d&&!u&&i(/gecko/),b=y&&i(/rv:1\.9/),ri=y&&i(/rv:2\.0/),ui=y&&i(/rv:5\./),fi=y&&i(/rv:10\./),ei=b&&i(/rv:1\.9\.0/),oi=b&&i(/rv:1\.9\.1/),si=b&&i(/rv:1\.9\.2/),ut=i(/windows|win32/),ft=i(/macintosh|mac os x/),et=i(/linux/),hi=v(!0,/\bchrome\/(\d+\.\d+)/),a=v(!0,/\bfirefox\/(\d+\.\d+)/),ci=v(u,/msie (\d+\.\d+)/),li=v(p,/version\/(\d+\.\d+)/),ai=v(c,/version\/(\d+\.\d+)/),vi=v(d,/webkit\/(\d+\.\d+)/),yi=Bridge.global.location?/^https/i.test(Bridge.global.location.protocol):!1,ot=/iPhone/i.test(navigator.platform),st=/iPod/i.test(navigator.platform),g=/iPad/i.test(navigator.userAgent),pi=/Blackberry/i.test(navigator.userAgent),ht=/Android/i.test(navigator.userAgent),ct=ft||ut||et&&!ht,lt=g,wi=!ct&&!lt,bi={isStrict:tt,isIEQuirks:u&&!tt&&(f||e||h||l),isOpera:p,isOpera10_5:kt,isWebKit:d,isChrome:it,isSafari:c,isSafari3:gt,isSafari4:ni,isSafari5:ii,isSafari5_0:ti,isSafari2:dt,isIE:u,isIE6:f,isIE7:e,isIE7m:f||e,isIE7p:u&&!f,isIE8:h,isIE8m:f||e||h,isIE8p:u&&!(f||e),isIE9:l,isIE9m:f||e||h||l,isIE9p:u&&!(f||e||h),isIE10:w,isIE10m:f||e||h||l||w,isIE10p:u&&!(f||e||h||l),isIE11:rt,isIE11m:f||e||h||l||w||rt,isIE11p:u&&!(f||e||h||l||w),isGecko:y,isGecko3:b,isGecko4:ri,isGecko5:ui,isGecko10:fi,isFF3_0:ei,isFF3_5:oi,isFF3_6:si,isFF4:4<=a&&a<5,isFF5:5<=a&&a<6,isFF10:10<=a&&a<11,isLinux:et,isWindows:ut,isMac:ft,chromeVersion:hi,firefoxVersion:a,ieVersion:ci,operaVersion:li,safariVersion:ai,webKitVersion:vi,isSecure:yi,isiPhone:ot,isiPod:st,isiPad:g,isBlackberry:pi,isAndroid:ht,isDesktop:ct,isTablet:lt,isPhone:wi,iOS:ot||g||st,standalone:Bridge.global.navigator?!!Bridge.global.navigator.standalone:!1};Bridge.Browser=bi;at={_initialize:function(){this.$initialized||(this.$initialized=Bridge.emptyFn,this.$staticInit&&this.$staticInit(),this.$initMembers&&this.$initMembers())},initConfig:function(n,t,i,r,u,f){var s,e,o,h;if(i.fields)for(e in i.fields)u[e]=i.fields[e];if(i.properties)for(e in i.properties)Bridge.property(u,e,i.properties[e],r);if(i.events)for(e in i.events)Bridge.event(u,e,i.events[e],r);if(i.alias)for(o=0;o0&&u.$$inherits[0].$staticInit&&u.$$inherits[0].$staticInit(),u.$base.ctor.call(this))},i.ctor=u),i.$literal&&(o&&o.getDefaultValue||(u.getDefaultValue=function(){var n={};return n.$getType=function(){return u},n}),u.$literal=!0,delete i.$literal),!l&&d&&(tt=Bridge.Class.set(tt,n,u)),r&&r.fn.$cache.push({type:u,args:r.args}),u.$$name=n,u.$kind=i.$kind,r&&l){for(u.$genericTypeDefinition=r.fn,u.$typeArguments=r.args,u.$assembly=r.fn.$assembly||Bridge.$currentAssembly,p=Bridge.Reflection.getTypeFullName(r.fn),s=0;s0)for(u=0;u0)for(u=0;u1?t[1]:"Object")},_makeQName:function(n,t){return n+(t?", "+t.name:"")},getTypeQName:function(n){return Bridge.Reflection._makeQName(Bridge.Reflection.getTypeFullName(n),n.$assembly)},getTypeName:function(n){var t=Bridge.Reflection.getTypeFullName(n),i=t.indexOf("["),r=t.lastIndexOf(".",i>=0?i:t.length);return r>0?i>=0?t.substring(r+1,i):t.substr(r+1):t},getTypeNamespace:function(n){var t=Bridge.Reflection.getTypeFullName(n),u=t.indexOf("["),f=t.lastIndexOf(".",u>=0?u:t.length),i=f>0?t.substr(0,f):"",r;return n.$assembly&&(r=Bridge.Reflection._getAssemblyType(n.$assembly,i),r&&(i=Bridge.Reflection.getTypeNamespace(r))),i},getTypeAssembly:function(n){return System.Array.contains([Date,Number,Boolean,String,Function,Array],n)||n.$isArray?Bridge.SystemAssembly:n.$assembly||Bridge.SystemAssembly},_getAssemblyType:function(n,t){var e=!1,u,f,i,r;if(n||(n=Bridge.SystemAssembly,e=!0),n.$types){if(u=n.$types[t]||null,u)return u;if(n.name==="mscorlib")n=Bridge.global;else return null}for(f=t.split("."),i=n,r=0;r0?n.substring(r.index+1,i.lastIndex-1):n.substring(r.index+1)).trim()])))return null;break;case",":if(i.exec(n),!(t=System.Reflection.Assembly.assemblies[(i.lastIndex>0?n.substring(r.index+1,i.lastIndex-1):n.substring(r.index+1)).trim()]))return null}}else f=n.substring(o);return s&&i.lastIndex?null:(u=Bridge.Reflection._getAssemblyType(t,f.trim()),u=e.length?u.apply(null,e):u,u&&u.$staticInit&&u.$staticInit(),u)},getType:function(n,t){if(n==null)throw new System.ArgumentNullException("typeName");return n?Bridge.Reflection._getType(n,t):null},canAcceptNull:function(n){return n.$kind==="struct"||n===System.Decimal||n===System.Int64||n===System.UInt64||n===System.Double||n===System.Single||n===System.Byte||n===System.SByte||n===System.Int16||n===System.UInt16||n===System.Int32||n===System.UInt32||n===Bridge.Int||n===Boolean||n===Date||n===Number?!1:!0},applyConstructor:function(n,t){var a,f,s,h,e,i,r,c,o,u,l;if(!t||t.length===0)return new n;if(n.$$initCtor&&n.$kind!=="anonymous"){if(a=Bridge.getMetadata(n),f=0,a){for(s=Bridge.Reflection.getMembers(n,1,28),e=0;e1)throw new System.Exception("The ambiguous constructor call");}return l=function(){n.apply(this,t)},l.prototype=n.prototype,new l},getAttributes:function(n,t,i){var f=[],r,o,u,e,s,c,h;if(i&&(c=Bridge.Reflection.getBaseType(n),c))for(u=Bridge.Reflection.getAttributes(c,t,!0),r=0;r=0;h--)Bridge.Reflection.isInstanceOfType(f[h],o)&&f.splice(h,1);f.push(u)}return f},getMembers:function(n,t,i,r,u){var e=[],l,a,o,y,h,c,v,s,f;if(((i&72)==72||(i&6)==4)&&(l=Bridge.Reflection.getBaseType(n),l&&(e=Bridge.Reflection.getMembers(l,t&-2,i&(i&64?255:247)&(i&2?251:255),r,u))),a=function(n){if(t&n.t&&(i&4&&!n.is||i&8&&n.is)&&(!r||n.n===r)){if(u){if((n.p||[]).length!==u.length)return;for(var f=0;f1)throw new System.Reflection.AmbiguousMatchException("Ambiguous match");else if(s.length===1)return s[0];n=Bridge.Reflection.getBaseType(n)}return null}return e},midel:function(n,t,i){var r,u,f,e;if(n.is&&!!t)throw new System.ArgumentException("Cannot specify target for static method");else if(!n.is&&!t)throw new System.ArgumentException("Must specify target for instance method");if(n.fg)r=function(){return(n.is?n.td:this)[n.fg]};else if(n.fs)r=function(t){(n.is?n.td:this)[n.fs]=t};else{if(r=n.def||(n.is||n.sm?n.td[n.sn]:t[n.sn]),n.tpc){if(!i||i.length!==n.tpc)throw new System.ArgumentException("Wrong number of type arguments");u=r;r=function(){return u.apply(this,i.concat(Array.prototype.slice.call(arguments)))}}else if(i&&i.length)throw new System.ArgumentException("Cannot specify type arguments for non-generic method");n.exp&&(f=r,r=function(){return f.apply(this,Array.prototype.slice.call(arguments,0,arguments.length-1).concat(arguments[arguments.length-1]))});n.sm&&(e=r,r=function(){return e.apply(null,[this].concat(Array.prototype.slice.call(arguments)))})}return Bridge.fn.bind(t,r)},invokeCI:function(n,t){return n.exp&&(t=t.slice(0,t.length-1).concat(t[t.length-1])),n.def?n.def.apply(null,t):n.sm?n.td[n.sn].apply(null,t):Bridge.Reflection.applyConstructor(n.sn?n.td[n.sn]:n.td,t)},fieldAccess:function(n,t){if(n.is&&!!t)throw new System.ArgumentException("Cannot specify target for static field");else if(!n.is&&!t)throw new System.ArgumentException("Must specify target for instance field");if(t=n.is?n.td:t,arguments.length===3)t[n.sn]=arguments[2];else return t[n.sn]},getMetaValue:function(n,t,i){var r=n.$isTypeParameter?n:Bridge.getMetadata(n);return r?r[t]||i:i},isArray:function(n){return Bridge.arrayTypes.indexOf(n)>=0},hasGenericParameters:function(n){if(n.$typeArguments)for(var t=0;tt},gte:function(n,t){return Bridge.hasValue$1(n,t)&&n>=t},neq:function(n,t){return Bridge.hasValue(n)?n!==t:Bridge.hasValue(t)},lt:function(n,t){return Bridge.hasValue$1(n,t)&&n>t:null},srr:function(n,t){return Bridge.hasValue$1(n,t)?n>>>t:null},sub:function(n,t){return Bridge.hasValue$1(n,t)?n-t:null},bnot:function(n){return Bridge.hasValue(n)?~n:null},neg:function(n){return Bridge.hasValue(n)?-n:null},not:function(n){return Bridge.hasValue(n)?!n:null},pos:function(n){return Bridge.hasValue(n)?+n:null},lift:function(){for(var n=1;n=System.Char.min&&n<=System.Char.max},getDefaultValue:function(){return 0},parse:function(n){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("s");if(n.length!==1)throw new System.FormatException;return n.charCodeAt(0)},tryParse:function(n,t){var i=n&&n.length===1;return t.v=i?n.charCodeAt(0):0,i},format:function(n,t,i){return Bridge.Int.format(n,t,i)},charCodeAt:function(n,t){if(n==null)throw new System.ArgumentNullException;if(n.length!=1)throw new System.FormatException("String must be exactly one character long");return n.charCodeAt(t)},isWhiteSpace:function(n){return!/[^\s\x09-\x0D\x85\xA0]/.test(n)},isDigit:function(n){return n<256?n>=48&&n<=57:new RegExp("[0-90-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9]").test(String.fromCharCode(n))},isLetter:function(n){return n<256?n>=65&&n<=90||n>=97&&n<=122:new RegExp("[A-Za-za-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧա-ևᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓꞡꞣꞥꞧꞩꟺff-stﬓ-ﬗa-zA-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-ZDžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꜗ-ꜟꝰꞈꟸꟹꧏꩰꫝꫳꫴー゙゚ªºƻǀ-ǃʔא-תװ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॲ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎა-ჺჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳱᳵᳶℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]").test(String.fromCharCode(n))},isHighSurrogate:function(n){return new RegExp("[\uD800-\uDBFF]").test(String.fromCharCode(n))},isLowSurrogate:function(n){return new RegExp("[\uDC00-\uDFFF]").test(String.fromCharCode(n))},isSurrogate:function(n){return new RegExp("[\uD800-\uDFFF]").test(String.fromCharCode(n))},isNull:function(n){return new RegExp("\x00").test(String.fromCharCode(n))},isSymbol:function(n){return n<256?[36,43,60,61,62,94,96,124,126,162,163,164,165,166,167,168,169,172,174,175,176,177,180,182,184,215,247].indexOf(n)!=-1:new RegExp("[₠-⃏⃐-⃿℀-⅏⅐-↏←-⇿∀-⋿⌀-⏿■-◿☀-⛿✀-➿⟀-⟯⟰-⟿⠀-⣿⤀-⥿⦀-⧿⨀-⫿⬀-⯿]").test(String.fromCharCode(n))},isSeparator:function(n){return n<256?n==32||n==160:new RegExp("[\u2028\u2029   ᠎ -    ]").test(String.fromCharCode(n))},isPunctuation:function(n){return n<256?[33,34,35,37,38,39,40,41,42,44,45,46,47,58,59,63,64,91,92,93,95,123,125,161,171,173,183,187,191].indexOf(n)!=-1:new RegExp("[!-#%-*,-/:;?@[-]_{}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰૰෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⸻、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・-֊־᐀᠆‐-―⸗⸚⸺⸻〜〰゠︱︲﹘﹣-([{༺༼᚛‚„⁅⁽₍〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨〈《「『【〔〖〘〚〝﴾︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「)]}༻༽᚜⁆⁾₎〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩〉》」』】〕〗〙〛〞〟﴿︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」«‘‛“‟‹⸂⸄⸉⸌⸜⸠»’”›⸃⸅⸊⸍⸝⸡_‿⁀⁔︳︴﹍-﹏_!-#%-'*,./:;?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰૰෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙭᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・]").test(String.fromCharCode(n))},isNumber:function(n){return n<256?[48,49,50,51,52,53,54,55,56,57,178,179,185,188,189,190].indexOf(n)!=-1:new RegExp("[0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൦-൵๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-90-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൰-൵༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵]").test(String.fromCharCode(n))},isControl:function(n){return n<256?n>=0&&n<=31||n>=127&&n<=159:new RegExp("[\x00-\x1f€-Ÿ]").test(String.fromCharCode(n))}}});Bridge.Class.addExtend(System.Char,[System.IComparable$1(System.Char),System.IEquatable$1(System.Char)]);Bridge.define("System.FormattableString",{inherits:[System.IFormattable],statics:{invariant:function(n){return n.toString$1(System.Globalization.CultureInfo.invariantCulture)}},toString:function(){return this.toString$1(System.Globalization.CultureInfo.getCurrentCulture())},System$IFormattable$format:function(n,t){return this.toString$1(t)}});Bridge.define("System.FormattableStringImpl",{inherits:[System.FormattableString],args:null,format:null,ctor:function(n,t){t===void 0&&(t=[]);this.$initialize();System.FormattableString.ctor.call(this);this.format=n;this.args=t},getArgumentCount:function(){return this.args.length},getFormat:function(){return this.format},getArgument:function(n){return this.args[n]},getArguments:function(){return this.args},toString$1:function(n){return System.String.formatProvider.apply(System.String,[n,this.format].concat(this.args))}});Bridge.define("System.Runtime.CompilerServices.FormattableStringFactory",{statics:{create:function(n,t){return t===void 0&&(t=[]),new System.FormattableStringImpl(n,t)}}});Bridge.define("System.Exception",{ctor:function(n,t){this.$initialize();this.message=n?n:"Exception of type '"+Bridge.getTypeName(this)+"' was thrown.";this.innerException=t?t:null;this.errorStack=new Error;this.data=new(System.Collections.Generic.Dictionary$2(Object,Object))},getMessage:function(){return this.message},getInnerException:function(){return this.innerException},getStackTrace:function(){return this.errorStack.stack},getData:function(){return this.data},toString:function(){return this.getMessage()},statics:{create:function(n){return Bridge.is(n,System.Exception)?n:n instanceof TypeError?new System.NullReferenceException(n.message,new Bridge.ErrorException(n)):n instanceof RangeError?new System.ArgumentOutOfRangeException(null,n.message,new Bridge.ErrorException(n)):n instanceof Error?new Bridge.ErrorException(n):new System.Exception(n?n.toString():null)}}});Bridge.define("System.SystemException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"System error.",t)}});Bridge.define("System.OutOfMemoryException",{inherits:[System.SystemException],ctor:function(n,t){this.$initialize();n||(n="Insufficient memory to continue the execution of the program.");System.SystemException.ctor.call(this,n,t)}});Bridge.define("System.IndexOutOfRangeException",{inherits:[System.SystemException],ctor:function(n,t){this.$initialize();n||(n="Index was outside the bounds of the array.");System.SystemException.ctor.call(this,n,t)}});Bridge.define("System.TimeoutException",{inherits:[System.SystemException],ctor:function(n,t){this.$initialize();n||(n="The operation has timed out.");System.SystemException.ctor.call(this,n,t)}});Bridge.define("System.RegexMatchTimeoutException",{inherits:[System.TimeoutException],_regexInput:"",_regexPattern:"",_matchTimeout:null,config:{init:function(){this._matchTimeout=System.TimeSpan.fromTicks(-1)}},ctor:function(){this.$initialize();System.TimeoutException.ctor.call(this)},$ctor1:function(n){this.$initialize();System.TimeoutException.ctor.call(this,n)},$ctor2:function(n,t){this.$initialize();System.TimeoutException.ctor.call(this,n,t)},$ctor3:function(n,t,i){this.$initialize();this._regexInput=n;this._regexPattern=t;this._matchTimeout=i;this.$ctor1("The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.")},getPattern:function(){return this._regexPattern},getInput:function(){return this._regexInput},getMatchTimeout:function(){return this._matchTimeout}});Bridge.define("Bridge.ErrorException",{inherits:[System.Exception],ctor:function(n){this.$initialize();System.Exception.ctor.call(this,n.message);this.errorStack=n;this.error=n},getError:function(){return this.error}});Bridge.define("System.ArgumentException",{inherits:[System.Exception],ctor:function(n,t,i){this.$initialize();System.Exception.ctor.call(this,n||"Value does not fall within the expected range.",i);this.paramName=t?t:null},getParamName:function(){return this.paramName}});Bridge.define("System.ArgumentNullException",{inherits:[System.ArgumentException],ctor:function(n,t,i){this.$initialize();t||(t="Value cannot be null.",n&&(t+="\nParameter name: "+n));System.ArgumentException.ctor.call(this,t,n,i)}});Bridge.define("System.ArgumentOutOfRangeException",{inherits:[System.ArgumentException],ctor:function(n,t,i,r){this.$initialize();t||(t="Value is out of range.",n&&(t+="\nParameter name: "+n));System.ArgumentException.ctor.call(this,t,n,i);this.actualValue=r?r:null},getActualValue:function(){return this.actualValue}});Bridge.define("System.Globalization.CultureNotFoundException",{inherits:[System.ArgumentException],ctor:function(n,t,i,r,u){this.$initialize();i||(i="Culture is not supported.",n&&(i+="\nParameter name: "+n),t&&(i+="\n"+t+" is an invalid culture identifier."));System.ArgumentException.ctor.call(this,i,n,r);this.invalidCultureName=t?t:null;this.invalidCultureId=u?u:null},getInvalidCultureName:function(){return this.invalidCultureName},getInvalidCultureId:function(){return this.invalidCultureId}});Bridge.define("System.Collections.Generic.KeyNotFoundException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Key not found.",t)}});Bridge.define("System.ArithmeticException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Overflow or underflow in the arithmetic operation.",t)}});Bridge.define("System.DivideByZeroException",{inherits:[System.ArithmeticException],ctor:function(n,t){this.$initialize();System.ArithmeticException.ctor.call(this,n||"Division by 0.",t)}});Bridge.define("System.OverflowException",{inherits:[System.ArithmeticException],ctor:function(n,t){this.$initialize();System.ArithmeticException.ctor.call(this,n||"Arithmetic operation resulted in an overflow.",t)}});Bridge.define("System.FormatException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Invalid format.",t)}});Bridge.define("System.InvalidCastException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"The cast is not valid.",t)}});Bridge.define("System.InvalidOperationException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Operation is not valid due to the current state of the object.",t)}});Bridge.define("System.NotImplementedException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"The method or operation is not implemented.",t)}});Bridge.define("System.NotSupportedException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Specified method is not supported.",t)}});Bridge.define("System.NullReferenceException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Object is null.",t)}});Bridge.define("System.RankException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();System.Exception.ctor.call(this,n||"Attempted to operate on an array with the incorrect number of dimensions.",t)}});Bridge.define("Bridge.PromiseException",{inherits:[System.Exception],ctor:function(n,t,i){this.$initialize();this.arguments=System.Array.clone(n);t==null&&(t="Promise exception: [",t+=this.arguments.map(function(n){return n==null?"null":n.toString()}).join(", "),t+="]");System.Exception.ctor.call(this,t,i)},getArguments:function(){return this.arguments}});Bridge.define("System.OperationCanceledException",{inherits:[System.Exception],ctor:function(n,t,i){this.$initialize();System.Exception.ctor.call(this,n||"Operation was canceled.",i);this.cancellationToken=t||System.Threading.CancellationToken.none}});Bridge.define("System.Threading.Tasks.TaskCanceledException",{inherits:[System.OperationCanceledException],ctor:function(n,t,i){this.$initialize();System.OperationCanceledException.ctor.call(this,n||"A task was canceled.",null,i);this.task=t||null}});Bridge.define("System.AggregateException",{inherits:[System.Exception],ctor:function(n,t){this.$initialize();this.innerExceptions=new(System.Collections.ObjectModel.ReadOnlyCollection$1(System.Exception))(Bridge.hasValue(t)?Bridge.toArray(t):[]);System.Exception.ctor.call(this,n||"One or more errors occurred.",this.innerExceptions.items.length?this.innerExceptions.items[0]:null)},handle:function(n){var r,i,t;if(!Bridge.hasValue(n))throw new System.ArgumentNullException("predicate");for(r=this.innerExceptions.getCount(),i=[],t=0;t0)throw new System.AggregateException(this.getMessage(),i);},flatten:function(){var e=new(System.Collections.Generic.List$1(System.Exception)),n=new(System.Collections.Generic.List$1(System.AggregateException)),r,u,t,i,f;for(n.add(this),r=0;n.getCount()>r;)for(u=n.getItem(r++).innerExceptions,t=0;t6)throw new System.ArgumentOutOfRangeException("dayofweek");return this.abbreviatedDayNames[n]},getAbbreviatedMonthName:function(n){if(n<1||n>13)throw new System.ArgumentOutOfRangeException("month");return this.abbreviatedMonthNames[n-1]},getAllDateTimePatterns:function(n,t){var i=System.Globalization.DateTimeFormatInfo.$allStandardFormats,r,e,f,u,o=[];if(n){if(!i[n]){if(t)return null;throw new System.ArgumentException(null,"format");}r={};r[n]=i[n]}else r=i;for(i in r){for(e=r[i].split(" "),f="",u=0;u6)throw new System.ArgumentOutOfRangeException("dayofweek");return this.dayNames[n]},getMonthName:function(n){if(n<1||n>13)throw new System.ArgumentOutOfRangeException("month");return this.monthNames[n-1]},getShortestDayName:function(n){if(n<0||n>6)throw new System.ArgumentOutOfRangeException("dayOfWeek");return this.shortestDayNames[n]},clone:function(){return Bridge.copy(new System.Globalization.DateTimeFormatInfo,this,["abbreviatedDayNames","abbreviatedMonthGenitiveNames","abbreviatedMonthNames","amDesignator","dateSeparator","dayNames","firstDayOfWeek","fullDateTimePattern","longDatePattern","longTimePattern","monthDayPattern","monthGenitiveNames","monthNames","pmDesignator","rfc1123","shortDatePattern","shortestDayNames","shortTimePattern","sortableDateTimePattern","timeSeparator","universalSortableDateTimePattern","yearMonthPattern","roundtripFormat"])}});Bridge.define("System.Globalization.NumberFormatInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:{getFormat:"System$IFormatProvider$getFormat"}},statics:{ctor:function(){this.numberNegativePatterns=["(n)","-n","- n","n-","n -"];this.currencyNegativePatterns=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];this.currencyPositivePatterns=["$n","n$","$ n","n $"];this.percentNegativePatterns=["-n %","-n%","-%n","%-n","%n-","n-%","n%-","-% n","n %-","% n-","% -n","n- %"];this.percentPositivePatterns=["n %","n%","%n","% n"];this.invariantInfo=Bridge.merge(new System.Globalization.NumberFormatInfo,{nanSymbol:"NaN",negativeSign:"-",positiveSign:"+",negativeInfinitySymbol:"-Infinity",positiveInfinitySymbol:"Infinity",percentSymbol:"%",percentGroupSizes:[3],percentDecimalDigits:2,percentDecimalSeparator:".",percentGroupSeparator:",",percentPositivePattern:0,percentNegativePattern:0,currencySymbol:"¤",currencyGroupSizes:[3],currencyDecimalDigits:2,currencyDecimalSeparator:".",currencyGroupSeparator:",",currencyNegativePattern:0,currencyPositivePattern:0,numberGroupSizes:[3],numberDecimalDigits:2,numberDecimalSeparator:".",numberGroupSeparator:",",numberNegativePattern:1})}},getFormat:function(n){switch(n){case System.Globalization.NumberFormatInfo:return this;default:return null}},clone:function(){return Bridge.copy(new System.Globalization.NumberFormatInfo,this,["nanSymbol","negativeSign","positiveSign","negativeInfinitySymbol","positiveInfinitySymbol","percentSymbol","percentGroupSizes","percentDecimalDigits","percentDecimalSeparator","percentGroupSeparator","percentPositivePattern","percentNegativePattern","currencySymbol","currencyGroupSizes","currencyDecimalDigits","currencyDecimalSeparator","currencyGroupSeparator","currencyNegativePattern","currencyPositivePattern","numberGroupSizes","numberDecimalDigits","numberDecimalSeparator","numberGroupSeparator","numberNegativePattern"])}});Bridge.define("System.Globalization.CultureInfo",{inherits:[System.IFormatProvider,System.ICloneable],config:{alias:{getFormat:"System$IFormatProvider$getFormat"}},$entryPoint:!0,statics:{ctor:function(){this.cultures=this.cultures||{};this.invariantCulture=Bridge.merge(new System.Globalization.CultureInfo("iv",!0),{englishName:"Invariant Language (Invariant Country)",nativeName:"Invariant Language (Invariant Country)",numberFormat:System.Globalization.NumberFormatInfo.invariantInfo,dateTimeFormat:System.Globalization.DateTimeFormatInfo.invariantInfo});this.setCurrentCulture(System.Globalization.CultureInfo.invariantCulture)},getCurrentCulture:function(){return this.currentCulture},setCurrentCulture:function(n){this.currentCulture=n;System.Globalization.DateTimeFormatInfo.currentInfo=n.dateTimeFormat;System.Globalization.NumberFormatInfo.currentInfo=n.numberFormat},getCultureInfo:function(n){if(!n)throw new System.ArgumentNullException("name");return this.cultures[n]},getCultures:function(){for(var t=Bridge.getPropertyNames(this.cultures),i=[],n=0;n0|-(n<0),n%1==.5*r)?(f=Math.floor(n),(f+(i===4?r>0:f%2*r))/u):Math.round(n)/u},log10:Math.log10||function(n){return Math.log(n)/Math.LN10},logWithBase:function(n,t){return isNaN(n)?n:isNaN(t)?t:t===1?NaN:n!==1&&(t===0||t===Number.POSITIVE_INFINITY)?NaN:Bridge.Math.log10(n)/Bridge.Math.log10(t)},log:function(n){return n===0?Number.NEGATIVE_INFINITY:n<0||isNaN(n)?NaN:n===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:n===Number.NEGATIVE_INFINITY?NaN:Math.log(n)},sinh:Math.sinh||function(n){return(Math.exp(n)-Math.exp(-n))/2},cosh:Math.cosh||function(n){return(Math.exp(n)+Math.exp(-n))/2},tanh:Math.tanh||function(n){if(n===Infinity)return 1;if(n===-Infinity)return-1;var t=Math.exp(2*n);return(t-1)/(t+1)}};yt={trueString:"True",falseString:"False",is:function(n,t){return t===System.IComparable||t===System.IEquatable$1(Boolean)||t===System.IComparable$1(Boolean)?!0:!1},$is:function(n){return typeof n=="boolean"},getDefaultValue:function(){return!1},toString:function(n){return n?System.Boolean.trueString:System.Boolean.falseString},parse:function(n){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("value");var t={v:!1};if(!System.Boolean.tryParse(n,t))throw new System.FormatException("Bad format for Boolean value");return t.v},tryParse:function(n,t){if(t.v=!1,!Bridge.hasValue(n))return!1;if(System.String.equals(System.Boolean.trueString,n,5))return t.v=!0,!0;if(System.String.equals(System.Boolean.falseString,n,5))return t.v=!1,!0;for(var i=0,r=n.length-1;i=i){if(!System.Char.isWhiteSpace(n[r])&&!System.Char.isNull(n.charCodeAt(r)))break;r--}return(n=n.substr(i,r-i+1),System.String.equals(System.Boolean.trueString,n,5))?(t.v=!0,!0):System.String.equals(System.Boolean.falseString,n,5)?(t.v=!1,!0):!1}};System.Boolean=yt,function(){var n=function(n,t,i,r){var u=Bridge.define(n,{inherits:[System.IComparable,System.IFormattable],statics:{$number:!0,min:t,max:i,precision:r,$is:function(n){return typeof n=="number"&&Math.floor(n,0)===n&&n>=t&&n<=i},getDefaultValue:function(){return 0},parse:function(n,r){return Bridge.Int.parseInt(n,t,i,r)},tryParse:function(n,r,u){return Bridge.Int.tryParseInt(n,r,t,i,u)},format:function(n,t,i){return Bridge.Int.format(n,t,i,u)}}});u.$kind="";Bridge.Class.addExtend(u,[System.IComparable$1(u),System.IEquatable$1(u)])};n("System.Byte",0,255,3);n("System.SByte",-128,127,3);n("System.Int16",-32768,32767,5);n("System.UInt16",0,65535,5);n("System.Int32",-2147483648,2147483647,10);n("System.UInt32",0,4294967295,10)}();Bridge.define("Bridge.Int",{inherits:[System.IComparable,System.IFormattable],statics:{$number:!0,$is:function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n,0)===n},getDefaultValue:function(){return 0},format:function(n,t,i,r){var e=(i||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),nt=e.numberDecimalSeparator,rt=e.numberGroupSeparator,f=n instanceof System.Decimal,o=n instanceof System.Int64||n instanceof System.UInt64,tt=f||o?n.isZero()?!1:n.isNegative():n<0,l,u,v,b,g,c,k,d,a;if(!o&&(f?!n.isFinite():!isFinite(n)))return Number.NEGATIVE_INFINITY===n||f&&tt?e.negativeInfinitySymbol:isNaN(n)?e.nanSymbol:e.positiveInfinitySymbol;if(t||(t="G"),l=t.match(/^([a-zA-Z])(\d*)$/),l){b=l[1].toUpperCase();u=parseInt(l[2],10);u=u>15?15:u;switch(b){case"D":return this.defaultFormat(n,isNaN(u)?1:u,0,0,e,!0);case"F":case"N":return isNaN(u)&&(u=e.numberDecimalDigits),this.defaultFormat(n,1,u,u,e,b==="F");case"G":case"E":for(var h=0,s=f||o?o&&n.eq(System.Int64.MinValue)?System.Int64(n.value.toUnsigned()):n.abs():Math.abs(n),y=l[1],it=3,p,w;f||o?s.gte(10):s>=10;)f||o?s=s.div(10):s/=10,h++;while(f||o?s.ne(0)&&s.lt(1):s!==0&&s<1)f||o?s=s.mul(10):s*=10,h--;if(b==="G"){if(g=isNaN(u),g&&(u=f?29:o?n instanceof System.Int64?19:20:r&&r.precision?r.precision:15),h>-5&&h0?h+1:1),this.defaultFormat(n,1,p,w,e,!0);y=y==="G"?"E":"e";it=2;p=0;w=(u||15)-1}else p=w=isNaN(u)?6:u;return h>=0?y+=e.positiveSign:(y+=e.negativeSign,h=-h),tt&&(f||o?s=s.mul(-1):s*=-1),this.defaultFormat(s,1,p,w,e)+y+this.defaultFormat(h,it,0,0,e,!0);case"P":return isNaN(u)&&(u=e.percentDecimalDigits),this.defaultFormat(n*100,1,u,u,e,!1,"percent");case"X":for(c=f?n.round().value.toHex().substr(2):o?n.toString(16):Math.round(n).toString(16),l[1]==="X"&&(c=c.toUpperCase()),u-=c.length;u-->0;)c="0"+c;return c;case"C":return isNaN(u)&&(u=e.currencyDecimalDigits),this.defaultFormat(n,1,u,u,e,!1,"currency");case"R":return k=f||o?n.toString():""+n,nt!=="."&&(k=k.replace(".",nt)),k.replace("e","E")}}if(t.indexOf(",.")!==-1||System.String.endsWith(t,",")){for(d=0,a=t.indexOf(",."),a===-1&&(a=t.length-1);a>-1&&t.charAt(a)===",";)d++,a--;f||o?n=n.div(Math.pow(1e3,d)):n/=Math.pow(1e3,d)}return t.indexOf("%")!==-1&&(f||o?n=n.mul(100):n*=100),t.indexOf("‰")!==-1&&(f||o?n=n.mul(1e3):n*=1e3),v=t.split(";"),(f||o?n.lt(0):n<0)&&v.length>1?(f||o?n=n.mul(-1):n*=-1,t=v[1]):t=v[(f||o?n.ne(0):!n)&&v.length>2?2:0],this.customFormat(n,t,e,!t.match(/^[^\.]*[0#],[0#]/))},defaultFormat:function(n,t,i,r,u,f,e){e=e||"number";var h=(u||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),o,p,w,ut,v,y,b=h[e+"GroupSizes"],s,k,d,l,a,g,nt,c="",tt=n instanceof System.Decimal,it=n instanceof System.Int64||n instanceof System.UInt64,ft=tt||it?n.isZero()?!1:n.isNegative():n<0,rt=!1;if(ut=Math.pow(10,r),o=tt?n.abs().toDecimalPlaces(r).toFixed():it?n.eq(System.Int64.MinValue)?n.value.toUnsigned().toString():n.abs().toString():""+ +Math.abs(n).toFixed(r),rt=o.split("").every(function(n){return n==="0"||n==="."}),p=o.indexOf("."),p>0&&(s=h[e+"DecimalSeparator"]+o.substr(p+1),o=o.substr(0,p)),o.lengthr&&(s=s.substr(0,r+1))):i>0&&(s=h[e+"DecimalSeparator"]+Array(i+1).join("0")),v=0,y=b[v],o.length=0?(nt&&this.addGroup(n.substr(0,f),l),this.addGroup(n.charAt(f),l)):f>=h-s&&this.addGroup("0",l),nt=0):(b-->0||f=n.length?"0":n.charAt(f),l),e=l.buffer,f++)):u==="."?(g||d||(e+=n.substr(0,h),g=!0),(n.length>++f||b>0)&&(rt=!0,e+=i[y+"DecimalSeparator"])):u!==","&&(e+=u);return tt&&!it&&(e="-"+e),e},addGroup:function(n,t){for(var i=t.buffer,f=t.sep,r=t.groupIndex,u=0,e=n.length;u1&&r--%3==1&&(i+=f);t.buffer=i;t.groupIndex=r},parseFloat:function(n,t){var i={};return Bridge.Int.tryParseFloat(n,t,i,!1),i.v},tryParseFloat:function(n,t,i,r){var l,a,u,v;if(i.v=0,r==null&&(r=!0),n==null){if(r)return!1;throw new System.ArgumentNullException("s");}n=n.trim();var f=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo),h=f.numberDecimalSeparator,e=f.numberGroupSeparator,o="Input string was not in a correct format.",s=n.indexOf(h),c=e?n.indexOf(e):-1;if(s>-1&&(s-1&&s-1)){if(r)return!1;throw new System.FormatException(o);}if(h!=="."&&e!=="."&&n.indexOf(".")>-1){if(r)return!1;throw new System.FormatException(o);}if(c>-1){for(l="",u=0;u1){if(r)return!1;throw new System.FormatException(o);}}else{if(r)return!1;throw new System.FormatException(o);}if(v=parseFloat(n.replace(h,".")),isNaN(v)){if(r)return!1;throw new System.FormatException(o);}return i.v=v,!0},parseInt:function(n,t,i,r){if(r=r||10,n==null)throw new System.ArgumentNullException("str");if(r<=10&&!/^[+-]?[0-9]+$/.test(n)||r==16&&!/^[+-]?[0-9A-F]+$/gi.test(n))throw new System.FormatException("Input string was not in a correct format.");var u=parseInt(n,r);if(isNaN(u))throw new System.FormatException("Input string was not in a correct format.");if(ui)throw new System.OverflowException;return u},tryParseInt:function(n,t,i,r,u){return(t.v=0,u=u||10,u<=10&&!/^[+-]?[0-9]+$/.test(n)||u==16&&!/^[+-]?[0-9A-F]+$/gi.test(n))?!1:(t.v=parseInt(n,u),t.vr)?!1:!0},isInfinite:function(n){return n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY},trunc:function(n){return Bridge.isNumber(n)?n>0?Math.floor(n):Math.ceil(n):Bridge.Int.isInfinite(n)?n:null},div:function(n,t){if(!Bridge.isNumber(n)||!Bridge.isNumber(t))return null;if(t===0)throw new System.DivideByZeroException;return this.trunc(n/t)},mod:function(n,t){if(!Bridge.isNumber(n)||!Bridge.isNumber(t))return null;if(t===0)throw new System.DivideByZeroException;return n%t},check:function(n,t){if(System.Int64.is64Bit(n))return System.Int64.check(n,t);if(n instanceof System.Decimal)return System.Decimal.toInt(n,t);if(Bridge.isNumber(n)){if(System.Int64.is64BitType(t)){if(t===System.UInt64&&n<0)throw new System.OverflowException;return t===System.Int64?System.Int64(n):System.UInt64(n)}if(!t.$is(n))throw new System.OverflowException;}return Bridge.Int.isInfinite(n)?System.Int64.is64BitType(t)?t.MinValue:t.min:n},sxb:function(n){return Bridge.isNumber(n)?n|(n&128?4294967040:0):Bridge.Int.isInfinite(n)?System.SByte.min:null},sxs:function(n){return Bridge.isNumber(n)?n|(n&32768?4294901760:0):Bridge.Int.isInfinite(n)?System.Int16.min:null},clip8:function(n){return Bridge.isNumber(n)?Bridge.Int.sxb(n&255):Bridge.Int.isInfinite(n)?System.SByte.min:null},clipu8:function(n){return Bridge.isNumber(n)?n&255:Bridge.Int.isInfinite(n)?System.Byte.min:null},clip16:function(n){return Bridge.isNumber(n)?Bridge.Int.sxs(n&65535):Bridge.Int.isInfinite(n)?System.Int16.min:null},clipu16:function(n){return Bridge.isNumber(n)?n&65535:Bridge.Int.isInfinite(n)?System.UInt16.min:null},clip32:function(n){return Bridge.isNumber(n)?n|0:Bridge.Int.isInfinite(n)?System.Int32.min:null},clipu32:function(n){return Bridge.isNumber(n)?n>>>0:Bridge.Int.isInfinite(n)?System.UInt32.min:null},clip64:function(n){return Bridge.isNumber(n)?System.Int64(Bridge.Int.trunc(n)):Bridge.Int.isInfinite(n)?System.Int64.MinValue:null},clipu64:function(n){return Bridge.isNumber(n)?System.UInt64(Bridge.Int.trunc(n)):Bridge.Int.isInfinite(n)?System.UInt64.MinValue:null},sign:function(n){return Bridge.isNumber(n)?n===0?0:n<0?-1:1:null}}});Bridge.Int.$kind="";Bridge.Class.addExtend(Bridge.Int,[System.IComparable$1(Bridge.Int),System.IEquatable$1(Bridge.Int)]);Bridge.define("System.Double",{inherits:[System.IComparable,System.IFormattable],statics:{min:-Number.MAX_VALUE,max:Number.MAX_VALUE,precision:15,$number:!0,$is:function(n){return typeof n=="number"},getDefaultValue:function(){return 0},parse:function(n,t){return Bridge.Int.parseFloat(n,t)},tryParse:function(n,t,i){return Bridge.Int.tryParseFloat(n,t,i)},format:function(n,t,i){return Bridge.Int.format(n,t,i,System.Double)}}});System.Double.$kind="";Bridge.Class.addExtend(System.Double,[System.IComparable$1(System.Double),System.IEquatable$1(System.Double)]);Bridge.define("System.Single",{inherits:[System.IComparable,System.IFormattable],statics:{min:-34028234663852886e22,max:34028234663852886e22,precision:7,$number:!0,$is:System.Double.$is,getDefaultValue:System.Double.getDefaultValue,parse:System.Double.parse,tryParse:System.Double.tryParse,format:function(n,t,i){return Bridge.Int.format(n,t,i,System.Single)}}});System.Single.$kind="";Bridge.Class.addExtend(System.Single,[System.IComparable$1(System.Single),System.IEquatable$1(System.Single)]),function(n){function i(n,t,i){this.low=n|0;this.high=t|0;this.unsigned=!!i}function u(n){return!0===(n&&n.__isLong__)}function h(n,i){var r,u;if(i){if(n>>>=0,(u=0<=n&&256>n)&&(r=p[n]))return r;r=t(n,0>(n|0)?-1:0,!0);u&&(p[n]=r)}else{if(n|=0,(u=-128<=n&&128>n)&&(r=y[n]))return r;r=t(n,0>n?-1:0,!1);u&&(y[n]=r)}return r}function f(n,i){if(isNaN(n)||!isFinite(n))return i?s:e;if(i){if(0>n)return s;if(n>=d)return k}else{if(n<=-g)return r;if(n+1>=g)return b}return 0>n?f(-n,i).neg():t(n%4294967296|0,n/4294967296|0,i)}function t(n,t,r){return new i(n,t,r)}function v(n,t,i){var s,r,u,o,h;if(0===n.length)throw Error("empty string");if("NaN"===n||"Infinity"===n||"+Infinity"===n||"-Infinity"===n)return e;if("number"==typeof t?(i=t,t=!1):t=!!t,i=i||10,2>i||36o?(o=f(l(i,o)),r=r.mul(o).add(f(h))):(r=r.mul(s),r=r.add(f(h)));return r.unsigned=t,r}function o(n){return n instanceof i?n:"number"==typeof n?f(n):"string"==typeof n?v(n):t(n.low,n.high,n.unsigned)}var y,p,l,s,c,w,a,b,k,r;n.Bridge.$Long=i;i.__isLong__;Object.defineProperty(i.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1});i.isLong=u;y={};p={};i.fromInt=h;i.fromNumber=f;i.fromBits=t;l=Math.pow;i.fromString=v;i.fromValue=o;var d=4294967296*4294967296,g=d/2,nt=h(16777216),e=h(0);i.ZERO=e;s=h(0,!0);i.UZERO=s;c=h(1);i.ONE=c;w=h(1,!0);i.UONE=w;a=h(-1);i.NEG_ONE=a;b=t(-1,2147483647,!1);i.MAX_VALUE=b;k=t(-1,-1,!0);i.MAX_UNSIGNED_VALUE=k;r=t(0,-2147483648,!1);i.MIN_VALUE=r;n=i.prototype;n.toInt=function(){return this.unsigned?this.low>>>0:this.low};n.toNumber=function(){return this.unsigned?4294967296*(this.high>>>0)+(this.low>>>0):4294967296*this.high+(this.low>>>0)};n.toString=function(n){if(n=n||10,2>n||36>>0).toString(n),t=o;if(t.isZero())return i+e;for(;6>i.length;)i="0"+i;e=""+i+e}};n.getHighBits=function(){return this.high};n.getHighBitsUnsigned=function(){return this.high>>>0};n.getLowBits=function(){return this.low};n.getLowBitsUnsigned=function(){return this.low>>>0};n.getNumBitsAbs=function(){if(this.isNegative())return this.eq(r)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;0this.high};n.isPositive=function(){return this.unsigned||0<=this.high};n.isOdd=function(){return 1==(this.low&1)};n.isEven=function(){return 0==(this.low&1)};n.equals=function(n){return u(n)||(n=o(n)),this.unsigned!==n.unsigned&&1==this.high>>>31&&1==n.high>>>31?!1:this.high===n.high&&this.low===n.low};n.eq=n.equals;n.notEquals=function(n){return!this.eq(n)};n.neq=n.notEquals;n.lessThan=function(n){return 0>this.comp(n)};n.lt=n.lessThan;n.lessThanOrEqual=function(n){return 0>=this.comp(n)};n.lte=n.lessThanOrEqual;n.greaterThan=function(n){return 0>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1};n.comp=n.compare;n.negate=function(){return!this.unsigned&&this.eq(r)?r:this.not().add(c)};n.neg=n.negate;n.add=function(n){u(n)||(n=o(n));var e=this.high>>>16,i=this.high&65535,r=this.low>>>16,s=n.high>>>16,h=n.high&65535,c=n.low>>>16,f;return f=0+((this.low&65535)+(n.low&65535)),n=0+(f>>>16),n+=r+c,r=0+(n>>>16),r+=i+h,i=0+(r>>>16),i=i+(e+s)&65535,t((n&65535)<<16|f&65535,i<<16|r&65535,this.unsigned)};n.subtract=function(n){return u(n)||(n=o(n)),this.add(n.neg())};n.sub=n.subtract;n.multiply=function(n){var h,i,s,v;if(this.isZero()||(u(n)||(n=o(n)),n.isZero()))return e;if(this.eq(r))return n.isOdd()?r:e;if(n.eq(r))return this.isOdd()?r:e;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(nt)&&n.lt(nt))return f(this.toNumber()*n.toNumber(),this.unsigned);var w=this.high>>>16,y=this.high&65535,l=this.low>>>16,c=this.low&65535,b=n.high>>>16,p=n.high&65535,a=n.low>>>16;return n=n.low&65535,v=0+c*n,s=0+(v>>>16),s+=l*n,i=0+(s>>>16),s=(s&65535)+c*a,i+=s>>>16,s&=65535,i+=y*n,h=0+(i>>>16),i=(i&65535)+l*a,h+=i>>>16,i&=65535,i+=c*p,h+=i>>>16,i&=65535,h=h+(w*n+y*a+l*p+c*b)&65535,t(s<<16|v&65535,h<<16|i,this.unsigned)};n.mul=n.multiply;n.divide=function(n){var t,i,v;if(u(n)||(n=o(n)),n.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?s:e;if(this.unsigned)n.unsigned||(n=n.toUnsigned());else{if(this.eq(r))return n.eq(c)||n.eq(a)?r:n.eq(r)?c:(t=this.shr(1).div(n).shl(1),t.eq(e))?n.isNegative()?c:a:(i=this.sub(n.mul(t)),t.add(i.div(n)));if(n.eq(r))return this.unsigned?s:e;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg()}if(this.unsigned){if(n.gt(this))return s;if(n.gt(this.shru(1)))return w;v=s}else v=e;for(i=this;i.gte(n);){t=Math.max(1,Math.floor(i.toNumber()/n.toNumber()));for(var p=Math.ceil(Math.log(t)/Math.LN2),p=48>=p?1:l(2,p-48),h=f(t),y=h.mul(n);y.isNegative()||y.gt(i);)t-=p,h=f(t,this.unsigned),y=h.mul(n);h.isZero()&&(h=c);v=v.add(h);i=i.sub(y)}return v};n.div=n.divide;n.modulo=function(n){return u(n)||(n=o(n)),this.sub(this.div(n).mul(n))};n.mod=n.modulo;n.not=function(){return t(~this.low,~this.high,this.unsigned)};n.and=function(n){return u(n)||(n=o(n)),t(this.low&n.low,this.high&n.high,this.unsigned)};n.or=function(n){return u(n)||(n=o(n)),t(this.low|n.low,this.high|n.high,this.unsigned)};n.xor=function(n){return u(n)||(n=o(n)),t(this.low^n.low,this.high^n.high,this.unsigned)};n.shiftLeft=function(n){return u(n)&&(n=n.toInt()),0==(n&=63)?this:32>n?t(this.low<>>32-n,this.unsigned):t(0,this.low<n?t(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):t(this.high>>n-32,0<=this.high?0:-1,this.unsigned)};n.shr=n.shiftRight;n.shiftRightUnsigned=function(n){if(u(n)&&(n=n.toInt()),n&=63,0===n)return this;var i=this.high;return 32>n?t(this.low>>>n|i<<32-n,i>>>n,this.unsigned):32===n?t(i,0,this.unsigned):t(i>>>n-32,0,this.unsigned)};n.shru=n.shiftRightUnsigned;n.toSigned=function(){return this.unsigned?t(this.low,this.high,!1):this};n.toUnsigned=function(){return this.unsigned?this:t(this.low,this.high,!0)}}(Bridge.global);System.Int64=function(n){if(this.constructor!==System.Int64)return new System.Int64(n);Bridge.hasValue(n)||(n=0);this.T=System.Int64;this.unsigned=!1;this.value=System.Int64.getValue(n)};System.Int64.$$name="System.Int64";System.Int64.prototype.$$name="System.Int64";System.Int64.$kind="struct";System.Int64.prototype.$kind="struct";System.Int64.$$inherits=[];Bridge.Class.addExtend(System.Int64,[System.IComparable,System.IFormattable,System.IComparable$1(System.Int64),System.IEquatable$1(System.Int64)]);System.Int64.$is=function(n){return n instanceof System.Int64};System.Int64.is64Bit=function(n){return n instanceof System.Int64||n instanceof System.UInt64};System.Int64.is64BitType=function(n){return n===System.Int64||n===System.UInt64};System.Int64.getDefaultValue=function(){return System.Int64.Zero};System.Int64.getValue=function(n){return Bridge.hasValue(n)?n instanceof Bridge.$Long?n:n instanceof System.Int64?n.value:n instanceof System.UInt64?n.value.toSigned():Bridge.isArray(n)?new Bridge.$Long(n[0],n[1]):Bridge.isString(n)?Bridge.$Long.fromString(n):Bridge.isNumber(n)?Bridge.$Long.fromNumber(n):n instanceof System.Decimal?Bridge.$Long.fromString(n.toString()):Bridge.$Long.fromValue(n):null};System.Int64.create=function(n){return Bridge.hasValue(n)?n instanceof System.Int64?n:new System.Int64(n):null};System.Int64.lift=function(n){return Bridge.hasValue(n)?System.Int64.create(n):null};System.Int64.toNumber=function(n){return n?n.toNumber():null};System.Int64.prototype.toNumberDivided=function(n){var t=this.div(n),i=this.mod(n),r=i.toNumber()/n;return t.toNumber()+r};System.Int64.prototype.toJSON=function(){return this.toNumber()};System.Int64.prototype.toString=function(n,t){return!n&&!t?this.value.toString():Bridge.isNumber(n)&&!t?this.value.toString(n):Bridge.Int.format(this,n,t)};System.Int64.prototype.format=function(n,t){return Bridge.Int.format(this,n,t)};System.Int64.prototype.isNegative=function(){return this.value.isNegative()};System.Int64.prototype.abs=function(){if(this.T===System.Int64&&this.eq(System.Int64.MinValue))throw new System.OverflowException;return new this.T(this.value.isNegative()?this.value.neg():this.value)};System.Int64.prototype.compareTo=function(n){return this.value.compare(this.T.getValue(n))};System.Int64.prototype.add=function(n,t){var i=this.T.getValue(n),r=new this.T(this.value.add(i));if(t){var u=this.value.isNegative(),f=i.isNegative(),e=r.value.isNegative();if(u&&f&&!e||!u&&!f&&e||this.T===System.UInt64&&r.lt(System.UInt64.max(this,i)))throw new System.OverflowException;}return r};System.Int64.prototype.sub=function(n,t){var i=this.T.getValue(n),r=new this.T(this.value.sub(i));if(t){var u=this.value.isNegative(),f=i.isNegative(),e=r.value.isNegative();if(u&&!f&&!e||!u&&f&&e||this.T===System.UInt64&&this.value.lt(i))throw new System.OverflowException;}return r};System.Int64.prototype.isZero=function(){return this.value.isZero()};System.Int64.prototype.mul=function(n,t){var i=this.T.getValue(n),r=new this.T(this.value.mul(i)),u;if(t){var f=this.sign(),e=i.isZero()?0:i.isNegative()?-1:1,o=r.sign();if(this.T===System.Int64){if(this.eq(System.Int64.MinValue)||this.eq(System.Int64.MaxValue)){if(i.neq(1)&&i.neq(0))throw new System.OverflowException;return r}if(i.eq(Bridge.$Long.MIN_VALUE)||i.eq(Bridge.$Long.MAX_VALUE)){if(this.neq(1)&&this.neq(0))throw new System.OverflowException;return r}if(f===-1&&e===-1&&o!==1||f===1&&e===1&&o!==1||f===-1&&e===1&&o!==-1||f===1&&e===-1&&o!==-1)throw new System.OverflowException;if(u=r.abs(),u.lt(this.abs())||u.lt(System.Int64(i).abs()))throw new System.OverflowException;}else{if(this.eq(System.UInt64.MaxValue)){if(i.neq(1)&&i.neq(0))throw new System.OverflowException;return r}if(i.eq(Bridge.$Long.MAX_UNSIGNED_VALUE)){if(this.neq(1)&&this.neq(0))throw new System.OverflowException;return r}if(u=r.abs(),u.lt(this.abs())||u.lt(System.Int64(i).abs()))throw new System.OverflowException;}}return r};System.Int64.prototype.div=function(n){return new this.T(this.value.div(this.T.getValue(n)))};System.Int64.prototype.mod=function(n){return new this.T(this.value.mod(this.T.getValue(n)))};System.Int64.prototype.neg=function(n){if(n&&this.T===System.Int64&&this.eq(System.Int64.MinValue))throw new System.OverflowException;return new this.T(this.value.neg())};System.Int64.prototype.inc=function(n){return this.add(1,n)};System.Int64.prototype.dec=function(n){return this.sub(1,n)};System.Int64.prototype.sign=function(){return this.value.isZero()?0:this.value.isNegative()?-1:1};System.Int64.prototype.clone=function(){return new this.T(this)};System.Int64.prototype.ne=function(n){return this.value.neq(this.T.getValue(n))};System.Int64.prototype.neq=function(n){return this.value.neq(this.T.getValue(n))};System.Int64.prototype.eq=function(n){return this.value.eq(this.T.getValue(n))};System.Int64.prototype.lt=function(n){return this.value.lt(this.T.getValue(n))};System.Int64.prototype.lte=function(n){return this.value.lte(this.T.getValue(n))};System.Int64.prototype.gt=function(n){return this.value.gt(this.T.getValue(n))};System.Int64.prototype.gte=function(n){return this.value.gte(this.T.getValue(n))};System.Int64.prototype.equals=function(n){return this.value.eq(this.T.getValue(n))};System.Int64.prototype.equalsT=function(n){return this.equals(n)};System.Int64.prototype.getHashCode=function(){var n=this.sign()*397+this.value.high|0;return n*397+this.value.low|0};System.Int64.prototype.toNumber=function(){return this.value.toNumber()};System.Int64.parse=function(n){if(n==null)throw new System.ArgumentNullException("str");if(!/^[+-]?[0-9]+$/.test(n))throw new System.FormatException("Input string was not in a correct format.");var t=new System.Int64(n);if(n!==t.toString())throw new System.OverflowException;return t};System.Int64.tryParse=function(n,t){try{return n==null||!/^[+-]?[0-9]+$/.test(n)?(t.v=System.Int64(Bridge.$Long.ZERO),!1):(t.v=new System.Int64(n),n!==t.v.toString())?(t.v=System.Int64(Bridge.$Long.ZERO),!1):!0}catch(i){return t.v=System.Int64(Bridge.$Long.ZERO),!1}};System.Int64.divRem=function(n,t,i){n=System.Int64(n);t=System.Int64(t);var r=n.mod(t);return i.v=r,n.sub(r).div(t)};System.Int64.min=function(){for(var t=[],i,n=0,r=arguments.length;n>>0:Bridge.Int.isInfinite(n)?System.UInt32.min:null};System.Int64.clip64=function(n){return n?new System.Int64(n.value.toSigned()):Bridge.Int.isInfinite(n)?System.Int64.MinValue:null};System.Int64.clipu64=function(n){return n?new System.UInt64(n.value.toUnsigned()):Bridge.Int.isInfinite(n)?System.UInt64.MinValue:null};System.Int64.Zero=System.Int64(Bridge.$Long.ZERO);System.Int64.MinValue=System.Int64(Bridge.$Long.MIN_VALUE);System.Int64.MaxValue=System.Int64(Bridge.$Long.MAX_VALUE);System.Int64.precision=19;System.UInt64=function(n){if(this.constructor!==System.UInt64)return new System.UInt64(n);Bridge.hasValue(n)||(n=0);this.T=System.UInt64;this.unsigned=!0;this.value=System.UInt64.getValue(n,!0)};System.UInt64.$$name="System.UInt64";System.UInt64.prototype.$$name="System.UInt64";System.UInt64.$kind="struct";System.UInt64.prototype.$kind="struct";System.UInt64.$$inherits=[];Bridge.Class.addExtend(System.UInt64,[System.IComparable,System.IFormattable,System.IComparable$1(System.UInt64),System.IEquatable$1(System.UInt64)]);System.UInt64.$is=function(n){return n instanceof System.UInt64};System.UInt64.getDefaultValue=function(){return System.UInt64.Zero};System.UInt64.getValue=function(n){return Bridge.hasValue(n)?n instanceof Bridge.$Long?n:n instanceof System.UInt64?n.value:n instanceof System.Int64?n.value.toUnsigned():Bridge.isArray(n)?new Bridge.$Long(n[0],n[1],!0):Bridge.isString(n)?Bridge.$Long.fromString(n,!0):Bridge.isNumber(n)?Bridge.$Long.fromNumber(n,!0):n instanceof System.Decimal?Bridge.$Long.fromString(n.toString(),!0):Bridge.$Long.fromValue(n):null};System.UInt64.create=function(n){return Bridge.hasValue(n)?n instanceof System.UInt64?n:new System.UInt64(n):null};System.UInt64.lift=function(n){return Bridge.hasValue(n)?System.UInt64.create(n):null};System.UInt64.prototype.toJSON=System.Int64.prototype.toJSON;System.UInt64.prototype.toString=System.Int64.prototype.toString;System.UInt64.prototype.format=System.Int64.prototype.format;System.UInt64.prototype.isNegative=System.Int64.prototype.isNegative;System.UInt64.prototype.abs=System.Int64.prototype.abs;System.UInt64.prototype.compareTo=System.Int64.prototype.compareTo;System.UInt64.prototype.add=System.Int64.prototype.add;System.UInt64.prototype.sub=System.Int64.prototype.sub;System.UInt64.prototype.isZero=System.Int64.prototype.isZero;System.UInt64.prototype.mul=System.Int64.prototype.mul;System.UInt64.prototype.div=System.Int64.prototype.div;System.UInt64.prototype.toNumberDivided=System.Int64.prototype.toNumberDivided;System.UInt64.prototype.mod=System.Int64.prototype.mod;System.UInt64.prototype.neg=System.Int64.prototype.neg;System.UInt64.prototype.inc=System.Int64.prototype.inc;System.UInt64.prototype.dec=System.Int64.prototype.dec;System.UInt64.prototype.sign=System.Int64.prototype.sign;System.UInt64.prototype.clone=System.Int64.prototype.clone;System.UInt64.prototype.ne=System.Int64.prototype.ne;System.UInt64.prototype.neq=System.Int64.prototype.neq;System.UInt64.prototype.eq=System.Int64.prototype.eq;System.UInt64.prototype.lt=System.Int64.prototype.lt;System.UInt64.prototype.lte=System.Int64.prototype.lte;System.UInt64.prototype.gt=System.Int64.prototype.gt;System.UInt64.prototype.gte=System.Int64.prototype.gte;System.UInt64.prototype.equals=System.Int64.prototype.equals;System.UInt64.prototype.equalsT=System.Int64.prototype.equalsT;System.UInt64.prototype.getHashCode=System.Int64.prototype.getHashCode;System.UInt64.prototype.toNumber=System.Int64.prototype.toNumber;System.UInt64.parse=function(n){if(n==null)throw new System.ArgumentNullException("str");if(!/^[+-]?[0-9]+$/.test(n))throw new System.FormatException("Input string was not in a correct format.");var t=new System.UInt64(n);if(t.value.isNegative())throw new System.OverflowException;if(n!==t.toString())throw new System.OverflowException;return t};System.UInt64.tryParse=function(n,t){try{return n==null||!/^[+-]?[0-9]+$/.test(n)?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):(t.v=new System.UInt64(n),t.v.isNegative())?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):n!==t.v.toString()?(t.v=System.UInt64(Bridge.$Long.UZERO),!1):!0}catch(i){return t.v=System.UInt64(Bridge.$Long.UZERO),!1}};System.UInt64.min=function(){for(var t=[],i,n=0,r=arguments.length;n0){for(e+=t,u=1;o>u;u++)f=n[u]+"",i=r-f.length,i&&(e+=p(i)),e+=f;t=n[u];f=t+"";i=r-f.length;i&&(e+=p(i))}else if(0===t)return"0";for(;t%10==0;)t/=10;return e+t}function h(n,t,i){if(n!==~~n||t>n||n>i)throw Error(k+n);}function nt(n,t,i,u){for(var o,h,f,e=n[0];e>=10;e/=10)--t;return--t<0?(t+=r,o=0):(o=Math.ceil((t+1)/r),t%=r),e=s(10,r-t),f=n[o]%e|0,null==u?3>t?(0==t?f=f/100|0:1==t&&(f=f/10|0),h=4>i&&99999==f||i>3&&49999==f||5e4==f||0==f):h=(4>i&&f+1==e||i>3&&f+1==e/2)&&(n[o+1]/e/100|0)==s(10,t-2)-1||(f==e/2||0==f)&&0==(n[o+1]/e/100|0):4>t?(0==t?f=f/1e3|0:1==t?f=f/100|0:2==t&&(f=f/10|0),h=(u||4>i)&&9999==f||!u&&i>3&&4999==f):h=((u||4>i)&&f+1==e||!u&&i>3&&f+1==e/2)&&(n[o+1]/e/1e3|0)==s(10,t-3)-1,h}function tt(n,t,i){for(var u,f,r=[0],e=0,o=n.length;o>e;){for(f=r.length;f--;)r[f]*=t;for(r[0]+=ht.indexOf(n.charAt(e++)),u=0;ui-1&&(void 0===r[u+1]&&(r[u+1]=0),r[u+1]+=r[u]/i|0,r[u]%=i)}return r.reverse()}function ri(n,t){var i,u,f=t.d.length,e,r;for(32>f?(i=Math.ceil(f/3),u=Math.pow(4,-i).toString()):(i=16,u="2.3283064365386962890625e-10"),n.precision+=i,t=d(n,1,t.times(u),new n(1)),e=i;e--;)r=t.times(t),t=r.times(r).minus(r).times(8).plus(1);return n.precision-=i,t}function i(n,t,i,f){var v,c,o,h,p,w,y,e,l,b=n.constructor;n:if(null!=t){if(e=n.d,!e)return n;for(v=1,h=e[0];h>=10;h/=10)v++;if(c=t-v,0>c)c+=r,o=t,y=e[l=0],p=y/s(10,v-o-1)%10|0;else if(l=Math.ceil((c+1)/r),h=e.length,l>=h){if(!f)break n;for(;h++<=l;)e.push(0);y=p=0;v=1;c%=r;o=c-r+1}else{for(y=h=e[l],v=1;h>=10;h/=10)v++;c%=r;o=c-r+v;p=0>o?0:y/s(10,v-o-1)%10|0}if(f=f||0>t||void 0!==e[l+1]||(0>o?y:y%s(10,v-o-1)),w=4>i?(p||f)&&(0==i||i==(n.s<0?3:2)):p>5||5==p&&(4==i||f||6==i&&(c>0?o>0?y/s(10,v-o):0:e[l-1])%10&1||i==(n.s<0?8:7)),1>t||!e[0])return e.length=0,w?(t-=n.e+1,e[0]=s(10,(r-t%r)%r),n.e=-t||0):e[0]=n.e=0,n;if(0==c?(e.length=l,h=1,l--):(e.length=l+1,h=s(10,r-c),e[l]=o>0?(y/s(10,v-o)%s(10,o)|0)*h:0),w)for(;;){if(0==l){for(c=1,o=e[0];o>=10;o/=10)c++;for(o=e[0]+=h,h=1;o>=10;o/=10)h++;c!=h&&(n.e++,e[0]==a&&(e[0]=1));break}if(e[l]+=h,e[l]!=a)break;e[l--]=0;h=1}for(c=e.length;0===e[--c];)e.pop()}return u&&(n.e>b.maxE?(n.d=null,n.e=NaN):n.e0?r=r.charAt(0)+"."+r.slice(1)+p(u):f>1&&(r=r.charAt(0)+"."+r.slice(1)),r=r+(n.e<0?"e":"e+")+n.e):0>o?(r="0."+p(-o-1)+r,i&&(u=i-f)>0&&(r+=p(u))):o>=f?(r+=p(o+1-f),i&&(u=i-o-1)>0&&(r=r+"."+p(u))):((u=o+1)0&&(o+1===f&&(r+="."),r+=p(u))),r}function it(n,t){for(var i=1,u=n[0];u>=10;u/=10)i++;return i+t*r-1}function rt(n,t,r){if(t>eu)throw u=!0,r&&(n.precision=r),Error(ti);return i(new n(ut),t,1,!0)}function l(n,t,r){if(t>ct)throw Error(ti);return i(new n(ft),t,r,!0)}function lt(n){var t=n.length-1,i=t*r+1;if(t=n[t]){for(;t%10==0;t/=10)i--;for(t=n[0];t>=10;t/=10)i++}return i}function p(n){for(var t="";n--;)t+="0";return t}function at(n,t,i,f){var s,e=new n(1),h=Math.ceil(f/r+4);for(u=!1;;){if(i%2&&(e=e.times(t),kt(e.d,h)&&(s=!0)),i=o(i/2),0===i){i=e.d.length-1;s&&0===e.d[i]&&++e.d[i];break}t=t.times(t);kt(t.d,h)}return u=!0,e}function vt(n){return 1&n.d[n.d.length-1]}function yt(n,t,i){for(var r,u=new n(t[0]),f=0;++f17)return new h(n.d?n.d[0]?n.s<0?0:1/0:1:n.s?n.s<0?0:n:NaN);for(null==t?(u=!1,r=w):r=t,c=new h(.03125);n.e>-2;)n=n.times(c),p+=5;for(v=Math.log(s(2,p))/Math.LN10*2+5|0,r+=v,l=a=o=new h(1),h.precision=r;;){if(a=i(a.times(n),r,1),l=l.times(++k),c=o.plus(f(a,l,r,1)),e(c.d).slice(0,r)===e(o.d).slice(0,r)){for(b=p;b--;)o=i(o.times(o),r,1);if(null!=t)return h.precision=w,o;if(!(3>y&&nt(o.d,r-v,d,y)))return i(o,h.precision=w,d,u=!0);h.precision=r+=10;l=a=c=new h(1);k=0;y++}o=c}}function w(n,t){var c,l,k,y,b,ut,h,p,o,g,tt,ft=1,d=10,r=n,a=r.d,s=r.constructor,it=s.rounding,v=s.precision;if(r.s<0||!a||!a[0]||!r.e&&1==a[0]&&1==a.length)return new s(a&&!a[0]?-1/0:1!=r.s?NaN:a?0:r);if(null==t?(u=!1,o=v):o=t,s.precision=o+=d,c=e(a),l=c.charAt(0),!(Math.abs(y=r.e)<15e14))return p=rt(s,o+2,v).times(y+""),r=w(new s(l+"."+c.slice(1)),o-d).plus(p),s.precision=v,null==t?i(r,v,it,u=!0):r;for(;7>l&&1!=l||1==l&&c.charAt(1)>3;)r=r.times(n),c=e(r.d),l=c.charAt(0),ft++;for(y=r.e,l>1?(r=new s("0."+c),y++):r=new s(l+"."+c.slice(1)),g=r,h=b=r=f(r.minus(1),r.plus(1),o,1),tt=i(r.times(r),o,1),k=3;;){if(b=i(b.times(tt),o,1),p=h.plus(f(b,new s(k),o,1)),e(p.d).slice(0,o)===e(h.d).slice(0,o)){if(h=h.times(2),0!==y&&(h=h.plus(rt(s,o+2,v).times(y+""))),h=f(h,new s(ft),o,1),null!=t)return s.precision=v,h;if(!nt(h.d,o-d,it,ut))return i(h,s.precision=v,it,u=!0);s.precision=o+=d;p=b=r=f(g.minus(1),g.plus(1),o,1);tt=i(r.times(r),o,1);k=ut=1}h=p;k+=2}}function pt(n){return String(n.s*n.s/0)}function wt(n,t){var f,i,e;for((f=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(0>f&&(f=i),f+=+t.slice(i+1),t=t.substring(0,i)):0>f&&(f=t.length),i=0;48===t.charCodeAt(i);i++);for(e=t.length;48===t.charCodeAt(e-1);--e);if(t=t.slice(i,e)){if(e-=i,n.e=f=f-i-1,n.d=[],i=(f+1)%r,0>f&&(i+=r),e>i){for(i&&n.d.push(+t.slice(0,i)),e-=r;e>i;)n.d.push(+t.slice(i,i+=r));t=t.slice(i);i=r-t.length}else i-=e;for(;i--;)t+="0";n.d.push(+t);u&&(n.e>n.constructor.maxE?(n.d=null,n.e=NaN):n.e0?(o=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),h=i>=0,s=n.constructor,h&&(t=t.replace(".",""),l=t.length,i=l-i,y=at(s,new s(e),i,2*i)),r=tt(t,e,a),v=r.length-1,i=v;0===r[i];--i)r.pop();return 0>i?new s(0*n.s):(n.e=it(r,v),n.d=r,u=!1,h&&(n=f(n,y,4*l)),o&&(n=n.times(Math.abs(o)<54?Math.pow(2,o):c.pow(2,o))),u=!0,n)}function fi(n,t){var i,u=t.d.length;if(3>u)return d(n,2,t,t);i=1.4*Math.sqrt(u);i=i>16?16:0|i;t=t.times(Math.pow(5,-i));t=d(n,2,t,t);for(var r,f=new n(5),e=new n(16),o=new n(20);i--;)r=t.times(t),t=t.times(f.plus(r.times(e.times(r).minus(o))));return t}function d(n,t,i,e,o){var h,s,c,l,y=1,a=n.precision,v=Math.ceil(a/r);for(u=!1,l=i.times(i),c=new n(e);;){if(s=f(c.times(l),new n(t++*t++),a,1),c=o?e.plus(s):e.minus(s),e=f(s.times(l),new n(t++*t++),a,1),s=c.plus(e),void 0!==s.d[v]){for(h=v;s.d[h]===c.d[h]&&h--;);if(-1==h)break}h=c;c=e;e=s;s=h;y++}return u=!0,s.d.length=v+1,s}function bt(n,t){var r,i=t.s<0,u=l(n,n.precision,1),f=u.times(.5);if(t=t.abs(),t.lte(f))return y=i?4:1,t;if(r=t.divToInt(u),r.isZero())y=i?3:2;else{if(t=t.minus(r.times(u)),t.lte(f))return y=vt(r)?i?2:3:i?4:1,t;y=vt(r)?i?1:4:i?3:2}return t.minus(u).abs()}function st(n,t,i,r){var l,c,o,k,s,a,u,e,y,p=n.constructor,w=void 0!==i;if(w?(h(i,1,b),void 0===r?r=p.rounding:h(r,0,8)):(i=p.precision,r=p.rounding),n.isFinite()){for(u=v(n),o=u.indexOf("."),w?(l=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):l=t,o>=0&&(u=u.replace(".",""),y=new p(1),y.e=u.length-o,y.d=tt(v(y),10,l),y.e=y.d.length),e=tt(u,10,l),c=s=e.length;0==e[--s];)e.pop();if(e[0]){if(0>o?c--:(n=new p(n),n.d=e,n.e=c,n=f(n,y,i,r,0,l),e=n.d,c=n.e,a=gt),o=e[i],k=l/2,a=a||void 0!==e[i+1],a=4>r?(void 0!==o||a)&&(0===r||r===(n.s<0?3:2)):o>k||o===k&&(4===r||a||6===r&&1&e[i-1]||r===(n.s<0?8:7)),e.length=i,a)for(;++e[--i]>l-1;)e[i]=0,i||(++c,e.unshift(1));for(s=e.length;!e[s-1];--s);for(o=0,u="";s>o;o++)u+=ht.charAt(e[o]);if(w){if(s>1)if(16==t||8==t){for(o=16==t?4:3,--s;s%o;s++)u+="0";for(e=tt(u,l,t),s=e.length;!e[s-1];--s);for(o=1,u="1.";s>o;o++)u+=ht.charAt(e[o])}else u=u.charAt(0)+"."+u.slice(1);u=u+(0>c?"p":"p+")+c}else if(0>c){for(;++c;)u="0"+u;u="0."+u}else if(++c>s)for(c-=s;c--;)u+="0";else s>c&&(u=u.slice(0,c)+"."+u.slice(c))}else u=w?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=pt(n);return n.s<0?"-"+u:u}function kt(n,t){if(n.length>t)return(n.length=t,!0)}function ei(n){return new this(n).abs()}function oi(n){return new this(n).acos()}function si(n){return new this(n).acosh()}function hi(n,t){return new this(n).plus(t)}function ci(n){return new this(n).asin()}function li(n){return new this(n).asinh()}function ai(n){return new this(n).atan()}function vi(n){return new this(n).atanh()}function yi(n,t){n=new this(n);t=new this(t);var i,u=this.precision,e=this.rounding,r=u+4;return n.s&&t.s?n.d||t.d?!t.d||n.isZero()?(i=t.s<0?l(this,u,e):new this(0),i.s=n.s):!n.d||t.isZero()?(i=l(this,r,1).times(.5),i.s=n.s):t.s<0?(this.precision=r,this.rounding=1,i=this.atan(f(n,t,r,1)),t=l(this,r,1),this.precision=u,this.rounding=e,i=n.s<0?i.minus(t):i.plus(t)):i=this.atan(f(n,t,r,1)):(i=l(this,r,1).times(t.s>0?.25:.75),i.s=n.s):i=new this(NaN),i}function pi(n){return new this(n).cbrt()}function wi(n){return i(n=new this(n),n.e+1,2)}function bi(n){if(!n||"object"!=typeof n)throw Error(et+"Object expected");for(var i,t,u=["precision",1,b,"rounding",0,8,"toExpNeg",-g,0,"toExpPos",0,g,"maxE",0,g,"minE",-g,0,"modulo",0,9],r=0;r=u[r+1]&&t<=u[r+2]))throw Error(k+i+": "+t);this[i]=t}if(void 0!==(t=n[i="crypto"])){if(t!==!0&&t!==!1&&0!==t&&1!==t)throw Error(k+i+": "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(ii);this[i]=!0}else this[i]=!1}return this}function ki(n){return new this(n).cos()}function di(n){return new this(n).cosh()}function dt(n){function i(n){var r,u,f,t=this;if(!(t instanceof i))return new i(n);if(t.constructor=i,n instanceof i)return t.s=n.s,t.e=n.e,void(t.d=(n=n.d)?n.slice():n);if(f=typeof n,"number"===f){if(0===n)return t.s=0>1/n?-1:1,t.e=0,void(t.d=[0]);if(0>n?(n=-n,t.s=-1):t.s=1,n===~~n&&1e7>n){for(r=0,u=n;u>=10;u/=10)r++;return t.e=r,void(t.d=[n])}return 0*n!=0?(n||(t.s=NaN),t.e=NaN,void(t.d=null)):wt(t,n.toString())}if("string"!==f)throw Error(k+n);return 45===n.charCodeAt(0)?(n=n.slice(1),t.s=-1):t.s=1,uu.test(n)?wt(t,n):ui(t,n)}var r,u,f;if(i.prototype=t,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=bi,i.clone=dt,i.abs=ei,i.acos=oi,i.acosh=si,i.add=hi,i.asin=ci,i.asinh=li,i.atan=ai,i.atanh=vi,i.atan2=yi,i.cbrt=pi,i.ceil=wi,i.cos=ki,i.cosh=di,i.div=gi,i.exp=nr,i.floor=tr,i.hypot=ir,i.ln=rr,i.log=ur,i.log10=er,i.log2=fr,i.max=or,i.min=sr,i.mod=hr,i.mul=cr,i.pow=lr,i.random=ar,i.round=vr,i.sign=yr,i.sin=pr,i.sinh=wr,i.sqrt=br,i.sub=kr,i.tan=dr,i.tanh=gr,i.trunc=nu,void 0===n&&(n={}),n)for(f=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;rt;)u=e[t],u>=429e7?e[t]=crypto.getRandomValues(new Uint32Array(1))[0]:f[t++]=u%1e7;else{if(!crypto.randomBytes)throw Error(ii);for(e=crypto.randomBytes(i*=4);i>t;)u=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+((127&e[t+3])<<24),u>=214e7?crypto.randomBytes(4).copy(e,t):(f.push(u%1e7),t+=4);t=i/4}else for(;i>t;)f[t++]=1e7*Math.random()|0;for(i=f[--t],n%=r,i&&n&&(u=s(10,r-n),f[t]=(i/u|0)*u);0===f[t];t--)f.pop();if(0>t)o=0,f=[0];else{for(o=-1;0===f[0];o-=r)f.shift();for(i=1,u=f[0];u>=10;u/=10)i++;r>i&&(o-=r-i)}return c.e=o,c.d=f,c}function vr(n){return i(n=new this(n),n.e+1,this.rounding)}function yr(n){return n=new this(n),n.d?n.d[0]?n.s:0*n.s:n.s||NaN}function pr(n){return new this(n).sin()}function wr(n){return new this(n).sinh()}function br(n){return new this(n).sqrt()}function kr(n,t){return new this(n).sub(t)}function dr(n){return new this(n).tan()}function gr(n){return new this(n).tanh()}function nu(n){return i(n=new this(n),n.e+1,1)}var gt,ni,y,g=9e15,b=1e9,ht="0123456789abcdef",ut="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",ft="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-g,maxE:g,crypto:!1},u=!0,et="[DecimalError] ",k=et+"Invalid argument: ",ti=et+"Precision limit exceeded",ii=et+"crypto unavailable",o=Math.floor,s=Math.pow,tu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,iu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ru=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,a=1e7,r=7,fu=9007199254740991,eu=ut.length-1,ct=ft.length-1,t={},f;t.absoluteValue=t.abs=function(){var n=new this.constructor(this);return n.s<0&&(n.s=1),i(n)};t.ceil=function(){return i(new this.constructor(this),this.e+1,2)};t.comparedTo=t.cmp=function(n){var r,h,f,e,o=this,i=o.d,u=(n=new o.constructor(n)).d,t=o.s,s=n.s;if(!i||!u)return t&&s?t!==s?t:i===u?0:!i^0>t?1:-1:NaN;if(!i[0]||!u[0])return i[0]?t:u[0]?-s:0;if(t!==s)return t;if(o.e!==n.e)return o.e>n.e^0>t?1:-1;for(f=i.length,e=u.length,r=0,h=e>f?f:e;h>r;++r)if(i[r]!==u[r])return i[r]>u[r]^0>t?1:-1;return f===e?0:f>e^0>t?1:-1};t.cosine=t.cos=function(){var u,f,t=this,n=t.constructor;return t.d?t.d[0]?(u=n.precision,f=n.rounding,n.precision=u+Math.max(t.e,t.sd())+r,n.rounding=1,t=ri(n,bt(n,t)),n.precision=u,n.rounding=f,i(2==y||3==y?t.neg():t,u,f,!0)):new n(1):new n(NaN)};t.cubeRoot=t.cbrt=function(){var r,w,n,s,v,c,l,h,y,p,t=this,a=t.constructor;if(!t.isFinite()||t.isZero())return new a(t);for(u=!1,c=t.s*Math.pow(t.s*t,1/3),c&&Math.abs(c)!=1/0?s=new a(c.toString()):(n=e(t.d),r=t.e,(c=(r-n.length+1)%3)&&(n+=1==c||-2==c?"0":"00"),c=Math.pow(n,1/3),r=o((r+1)/3)-(r%3==(0>r?-1:2)),c==1/0?n="5e"+r:(n=c.toExponential(),n=n.slice(0,n.indexOf("e")+1)+r),s=new a(n),s.s=t.s),l=(r=a.precision)+3;;)if(h=s,y=h.times(h).times(h),p=y.plus(t),s=f(p.plus(t).times(h),p.plus(y),l+2,1),e(h.d).slice(0,l)===(n=e(s.d)).slice(0,l)){if(n=n.slice(l-3,l+1),"9999"!=n&&(v||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(i(s,r+1,1),w=!s.times(s).times(s).eq(t));break}if(!v&&(i(h,r+1,0),h.times(h).times(h).eq(t))){s=h;break}l+=4;v=1}return u=!0,i(s,r,a.rounding,w)};t.decimalPlaces=t.dp=function(){var n,i=this.d,t=NaN;if(i){if(n=i.length-1,t=(n-o(this.e/r))*r,n=i[n])for(;n%10==0;n/=10)t--;0>t&&(t=0)}return t};t.dividedBy=t.div=function(n){return f(this,new this.constructor(n))};t.dividedToIntegerBy=t.divToInt=function(n){var r=this,t=r.constructor;return i(f(r,new t(n),0,1,1),t.precision,t.rounding)};t.equals=t.eq=function(n){return 0===this.cmp(n)};t.floor=function(){return i(new this.constructor(this),this.e+1,3)};t.greaterThan=t.gt=function(n){return this.cmp(n)>0};t.greaterThanOrEqualTo=t.gte=function(n){var t=this.cmp(n);return 1==t||0===t};t.hyperbolicCosine=t.cosh=function(){var r,u,f,h,e,n=this,t=n.constructor,c=new t(1),o,l,s;if(!n.isFinite())return new t(n.s?1/0:NaN);if(n.isZero())return c;for(f=t.precision,h=t.rounding,t.precision=f+Math.max(n.e,n.sd())+4,t.rounding=1,e=n.d.length,32>e?(r=Math.ceil(e/3),u=Math.pow(4,-r).toString()):(r=16,u="2.3283064365386962890625e-10"),n=d(t,1,n.times(u),new t(1),!0),l=r,s=new t(8);l--;)o=n.times(n),n=c.minus(o.times(s.minus(o.times(s))));return i(n,t.precision=f,t.rounding=h,!0)};t.hyperbolicSine=t.sinh=function(){var r,u,f,e,n=this,t=n.constructor;if(!n.isFinite()||n.isZero())return new t(n);if(u=t.precision,f=t.rounding,t.precision=u+Math.max(n.e,n.sd())+4,t.rounding=1,e=n.d.length,3>e)n=d(t,2,n,n,!0);else{r=1.4*Math.sqrt(e);r=r>16?16:0|r;n=n.times(Math.pow(5,-r));n=d(t,2,n,n,!0);for(var o,s=new t(5),h=new t(16),c=new t(20);r--;)o=n.times(n),n=n.times(s.plus(o.times(h.times(o).plus(c))))}return t.precision=u,t.rounding=f,i(n,u,f,!0)};t.hyperbolicTangent=t.tanh=function(){var i,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(i=n.precision,r=n.rounding,n.precision=i+7,n.rounding=1,f(t.sinh(),t.cosh(),n.precision=i,n.rounding=r)):new n(t.s)};t.inverseCosine=t.acos=function(){var u,t=this,n=t.constructor,f=t.abs().cmp(1),i=n.precision,r=n.rounding;return-1!==f?0===f?t.isNeg()?l(n,i,r):new n(0):new n(NaN):t.isZero()?l(n,i+4,r).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),u=l(n,i+4,r).times(.5),n.precision=i,n.rounding=r,u.minus(t))};t.inverseHyperbolicCosine=t.acosh=function(){var i,r,n=this,t=n.constructor;return n.lte(1)?new t(n.eq(1)?0:NaN):n.isFinite()?(i=t.precision,r=t.rounding,t.precision=i+Math.max(Math.abs(n.e),n.sd())+4,t.rounding=1,u=!1,n=n.times(n).minus(1).sqrt().plus(n),u=!0,t.precision=i,t.rounding=r,n.ln()):new t(n)};t.inverseHyperbolicSine=t.asinh=function(){var i,r,n=this,t=n.constructor;return!n.isFinite()||n.isZero()?new t(n):(i=t.precision,r=t.rounding,t.precision=i+2*Math.max(Math.abs(n.e),n.sd())+6,t.rounding=1,u=!1,n=n.times(n).plus(1).sqrt().plus(n),u=!0,t.precision=i,t.rounding=r,n.ln())};t.inverseHyperbolicTangent=t.atanh=function(){var r,u,o,e,n=this,t=n.constructor;return n.isFinite()?n.e>=0?new t(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(r=t.precision,u=t.rounding,e=n.sd(),Math.max(e,r)<2*-n.e-1?i(new t(n),r,u,!0):(t.precision=o=e-n.e,n=f(n.plus(1),new t(1).minus(n),o+r,1),t.precision=r+4,t.rounding=1,n=n.ln(),t.precision=r,t.rounding=u,n.times(.5))):new t(NaN)};t.inverseSine=t.asin=function(){var r,u,i,f,n=this,t=n.constructor;return n.isZero()?new t(n):(u=n.abs().cmp(1),i=t.precision,f=t.rounding,-1!==u?0===u?(r=l(t,i+4,f).times(.5),r.s=n.s,r):new t(NaN):(t.precision=i+6,t.rounding=1,n=n.div(new t(1).minus(n.times(n)).sqrt().plus(1)).atan(),t.precision=i,t.rounding=f,n.times(2)))};t.inverseTangent=t.atan=function(){var e,c,h,a,o,v,t,y,p,n=this,f=n.constructor,s=f.precision,w=f.rounding;if(n.isFinite()){if(n.isZero())return new f(n);if(n.abs().eq(1)&&ct>=s+4)return t=l(f,s+4,w).times(.25),t.s=n.s,t}else{if(!n.s)return new f(NaN);if(ct>=s+4)return t=l(f,s+4,w).times(.5),t.s=n.s,t}for(f.precision=y=s+10,f.rounding=1,h=Math.min(28,y/r+2|0),e=h;e;--e)n=n.div(n.times(n).plus(1).sqrt().plus(1));for(u=!1,c=Math.ceil(y/r),a=1,p=n.times(n),t=new f(n),o=n;-1!==e;)if(o=o.times(p),v=t.minus(o.div(a+=2)),o=o.times(p),t=v.plus(o.div(a+=2)),void 0!==t.d[c])for(e=c;t.d[e]===v.d[e]&&e--;);return h&&(t=t.times(2<this.d.length-2};t.isNaN=function(){return!this.s};t.isNegative=t.isNeg=function(){return this.s<0};t.isPositive=t.isPos=function(){return this.s>0};t.isZero=function(){return!!this.d&&0===this.d[0]};t.lessThan=t.lt=function(n){return this.cmp(n)<0};t.lessThanOrEqualTo=t.lte=function(n){return this.cmp(n)<1};t.logarithm=t.log=function(n){var l,t,a,o,p,v,r,s,c=this,h=c.constructor,y=h.precision,b=h.rounding;if(null==n)n=new h(10),l=!0;else{if(n=new h(n),t=n.d,n.s<0||!t||!t[0]||n.eq(1))return new h(NaN);l=n.eq(10)}if(t=c.d,c.s<0||!t||!t[0]||c.eq(1))return new h(t&&!t[0]?-1/0:1!=c.s?NaN:t?0:1/0);if(l)if(t.length>1)p=!0;else{for(o=t[0];o%10==0;)o/=10;p=1!==o}if(u=!1,r=y+5,v=w(c,r),a=l?rt(h,r+10):w(n,r),s=f(v,a,r,1),nt(s.d,o=y,b))do if(r+=10,v=w(c,r),a=l?rt(h,r+10):w(n,r),s=f(v,a,r,1),!p){+e(s.d).slice(o+1,o+15)+1==1e14&&(s=i(s,y+1,0));break}while(nt(s.d,o+=10,b));return u=!0,i(s,y,b)};t.minus=t.sub=function(n){var l,p,f,w,c,s,k,b,t,d,y,e,h=this,v=h.constructor;if(n=new v(n),!h.d||!n.d)return h.s&&n.s?h.d?n.s=-n.s:n=new v(n.d||h.s!==n.s?h:NaN):n=new v(NaN),n;if(h.s!=n.s)return n.s=-n.s,h.plus(n);if(t=h.d,e=n.d,k=v.precision,b=v.rounding,!t[0]||!e[0]){if(e[0])n.s=-n.s;else{if(!t[0])return new v(3===b?-0:0);n=new v(h)}return u?i(n,k,b):n}if(p=o(n.e/r),d=o(h.e/r),t=t.slice(),c=d-p){for(y=0>c,y?(l=t,c=-c,s=e.length):(l=e,p=d,s=t.length),f=Math.max(Math.ceil(k/r),s)+2,c>f&&(c=f,l.length=1),l.reverse(),f=c;f--;)l.push(0);l.reverse()}else{for(f=t.length,s=e.length,y=s>f,y&&(s=f),f=0;s>f;f++)if(t[f]!=e[f]){y=t[f]0;--f)t[s++]=0;for(f=e.length;f>c;){if(t[--f]f?(c=t,f=-f,e=h.length):(c=h,p=l,e=t.length),l=Math.ceil(w/r),e=l>e?l+1:e+1,f>e&&(f=e,c.length=1),c.reverse();f--;)c.push(0);c.reverse()}for(e=t.length,f=h.length,0>e-f&&(f=e,c=h,h=t,t=c),y=0;f;)y=(t[--f]=t[f]+h[f]+y)/a|0,t[f]%=a;for(y&&(t.unshift(y),++p),e=t.length;0==t[--e];)t.pop();return n.d=t,n.e=it(t,p),u?i(n,w,b):n};t.precision=t.sd=function(n){var t,i=this;if(void 0!==n&&n!==!!n&&1!==n&&0!==n)throw Error(k+n);return i.d?(t=lt(i.d),n&&i.e+1>t&&(t=i.e+1)):t=NaN,t};t.round=function(){var n=this,t=n.constructor;return i(new t(n),n.e+1,t.rounding)};t.sine=t.sin=function(){var u,f,n=this,t=n.constructor;return n.isFinite()?n.isZero()?new t(n):(u=t.precision,f=t.rounding,t.precision=u+Math.max(n.e,n.sd())+r,t.rounding=1,n=fi(t,bt(t,n)),t.precision=u,t.rounding=f,i(y>2?n.neg():n,u,f,!0)):new t(NaN)};t.squareRoot=t.sqrt=function(){var p,n,l,r,y,c,h=this,a=h.d,t=h.e,s=h.s,v=h.constructor;if(1!==s||!a||!a[0])return new v(!s||0>s&&(!a||a[0])?NaN:a?h:1/0);for(u=!1,s=Math.sqrt(+h),0==s||s==1/0?(n=e(a),(n.length+t)%2==0&&(n+="0"),s=Math.sqrt(n),t=o((t+1)/2)-(0>t||t%2),s==1/0?n="1e"+t:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+t),r=new v(n)):r=new v(s.toString()),l=(t=v.precision)+3;;)if(c=r,r=c.plus(f(h,c,l+2,1)).times(.5),e(c.d).slice(0,l)===(n=e(r.d)).slice(0,l)){if(n=n.slice(l-3,l+1),"9999"!=n&&(y||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(i(r,t+1,1),p=!r.times(r).eq(h));break}if(!y&&(i(c,t+1,0),c.times(c).eq(h))){r=c;break}l+=4;y=1}return u=!0,i(r,t,v.rounding,p)};t.tangent=t.tan=function(){var r,u,n=this,t=n.constructor;return n.isFinite()?n.isZero()?new t(n):(r=t.precision,u=t.rounding,t.precision=r+10,t.rounding=1,n=n.sin(),n.s=1,n=f(n,new t(1).minus(n.times(n)).sqrt(),r+10,0),t.precision=r,t.rounding=u,i(2==y||4==y?n.neg():n,r,u,!0)):new t(NaN)};t.times=t.mul=function(n){var v,b,f,h,t,y,k,c,l,p=this,w=p.constructor,e=p.d,s=(n=new w(n)).d;if(n.s*=p.s,!(e&&e[0]&&s&&s[0]))return new w(!n.s||e&&!e[0]&&!s||s&&!s[0]&&!e?NaN:e&&s?0*n.s:n.s/0);for(b=o(p.e/r)+o(n.e/r),c=e.length,l=s.length,l>c&&(t=e,e=s,s=t,y=c,c=l,l=y),t=[],y=c+l,f=y;f--;)t.push(0);for(f=l;--f>=0;){for(v=0,h=c+f;h>f;)k=t[h]+s[f]*e[h-f-1]+v,t[h--]=k%a|0,v=k/a|0;t[h]=(t[h]+v)%a|0}for(;!t[--y];)t.pop();for(v?++b:t.shift(),f=t.length;!t[--f];)t.pop();return n.d=t,n.e=it(t,b),u?i(n,w.precision,w.rounding):n};t.toBinary=function(n,t){return st(this,2,n,t)};t.toDecimalPlaces=t.toDP=function(n,t){var r=this,u=r.constructor;return r=new u(r),void 0===n?r:(h(n,0,b),void 0===t?t=u.rounding:h(t,0,8),i(r,n+r.e+1,t))};t.toExponential=function(n,t){var u,r=this,f=r.constructor;return void 0===n?u=v(r,!0):(h(n,0,b),void 0===t?t=f.rounding:h(t,0,8),r=i(new f(r),n+1,t),u=v(r,!0,n+1)),r.isNeg()&&!r.isZero()?"-"+u:u};t.toFixed=function(n,t){var u,f,r=this,e=r.constructor;return void 0===n?u=v(r):(h(n,0,b),void 0===t?t=e.rounding:h(t,0,8),f=i(new e(r),n+r.e+1,t),u=v(f,!1,n+f.e+1)),r.isNeg()&&!r.isZero()?"-"+u:u};t.toFraction=function(n){var h,a,c,t,y,w,i,v,o,g,b,nt,p=this,d=p.d,l=p.constructor;if(!d)return new l(p);if(o=a=new l(1),c=v=new l(0),h=new l(c),y=h.e=lt(d)-p.e-1,w=y%r,h.d[0]=s(10,0>w?r+w:w),null==n)n=y>0?h:o;else{if(i=new l(n),!i.isInt()||i.lt(o))throw Error(k+i);n=i.gt(h)?y>0?h:o:i}for(u=!1,i=new l(e(d)),g=l.precision,l.precision=y=d.length*r*2;b=f(i,h,0,1,1),t=a.plus(b.times(c)),1!=t.cmp(n);)a=c,c=t,t=o,o=v.plus(b.times(t)),v=t,t=h,h=i.minus(b.times(t)),i=t;return t=f(n.minus(a),c,0,1,1),v=v.plus(t.times(o)),a=a.plus(t.times(c)),v.s=o.s=p.s,nt=f(o,c,y,1).minus(p).abs().cmp(f(v,a,y,1).minus(p).abs())<1?[o,c]:[v,a],l.precision=g,u=!0,nt};t.toHexadecimal=t.toHex=function(n,t){return st(this,16,n,t)};t.toNearest=function(n,t){var r=this,e=r.constructor;if(r=new e(r),null==n){if(!r.d)return r;n=new e(1);t=e.rounding}else{if(n=new e(n),void 0!==t&&h(t,0,8),!r.d)return n.s?r:n;if(!n.d)return n.s&&(n.s=r.s),n}return n.d[0]?(u=!1,4>t&&(t=[4,5,7,8][t]),r=f(r,n,0,t,1).times(n),u=!0,i(r)):(n.s=r.s,r=n),r};t.toNumber=function(){return+this};t.toOctal=function(n,t){return st(this,8,n,t)};t.toPower=t.pow=function(n){var l,a,h,c,v,y,b,t=this,f=t.constructor,p=+(n=new f(n));if(!(t.d&&n.d&&t.d[0]&&n.d[0]))return new f(s(+t,p));if(t=new f(t),t.eq(1))return t;if(h=f.precision,v=f.rounding,n.eq(1))return i(t,h,v);if(l=o(n.e/r),a=n.d.length-1,b=l>=a,y=t.s,b){if((a=0>p?-p:p)<=fu)return c=at(f,t,a,h),n.s<0?new f(1).div(c):i(c,h,v)}else if(0>y)return new f(NaN);return y=0>y&&1&n.d[Math.max(l,a)]?-1:1,a=s(+t,p),l=0!=a&&isFinite(a)?new f(a+"").e:o(p*(Math.log("0."+e(t.d))/Math.LN10+t.e+1)),l>f.maxE+1||l0?y/0:0):(u=!1,f.rounding=t.s=1,a=Math.min(12,(l+"").length),c=ot(n.times(w(t,h+a)),h),c=i(c,h+5,1),nt(c.d,h,v)&&(l=h+10,c=i(ot(n.times(w(t,l+a)),l),l+5,1),+e(c.d).slice(h+1,h+15)+1==1e14&&(c=i(c,h+1,0))),c.s=y,u=!0,f.rounding=v,i(c,h,v))};t.toPrecision=function(n,t){var f,r=this,u=r.constructor;return void 0===n?f=v(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(h(n,1,b),void 0===t?t=u.rounding:h(t,0,8),r=i(new u(r),n,t),f=v(r,n<=r.e||r.e<=u.toExpNeg,n)),r.isNeg()&&!r.isZero()?"-"+f:f};t.toSignificantDigits=t.toSD=function(n,t){var u=this,r=u.constructor;return void 0===n?(n=r.precision,t=r.rounding):(h(n,1,b),void 0===t?t=r.rounding:h(t,0,8)),i(new r(u),n,t)};t.toString=function(){var n=this,t=n.constructor,i=v(n,n.e<=t.toExpNeg||n.e>=t.toExpPos);return n.isNeg()&&!n.isZero()?"-"+i:i};t.truncated=t.trunc=function(){return i(new this.constructor(this),this.e+1,1)};t.valueOf=t.toJSON=function(){var n=this,t=n.constructor,i=v(n,n.e<=t.toExpNeg||n.e>=t.toExpPos);return n.isNeg()?"-"+i:i};f=function(){function n(n,t,i){var u,r=0,f=n.length;for(n=n.slice();f--;)u=n[f]*t+r,n[f]=u%i|0,r=u/i|0;return r&&n.unshift(r),n}function t(n,t,i,r){var u,f;if(i!=r)f=i>r?1:-1;else for(u=f=0;i>u;u++)if(n[u]!=t[u]){f=n[u]>t[u]?1:-1;break}return f}function u(n,t,i,r){for(var u=0;i--;)n[i]-=u,u=n[i]1;)n.shift()}return function(f,e,s,h,c,l){var g,et,w,y,it,ot,nt,ft,rt,ut,p,b,ht,tt,vt,ct,st,yt,d,lt,at=f.constructor,pt=f.s==e.s?1:-1,k=f.d,v=e.d;if(!(k&&k[0]&&v&&v[0]))return new at(f.s&&e.s&&(k?!v||k[0]!=v[0]:v)?k&&0==k[0]||!v?0*pt:pt/0:NaN);for(l?(it=1,et=f.e-e.e):(l=a,it=r,et=o(f.e/it)-o(e.e/it)),d=v.length,st=k.length,rt=new at(pt),ut=rt.d=[],w=0;v[w]==(k[w]||0);w++);if(v[w]>(k[w]||0)&&et--,null==s?(tt=s=at.precision,h=at.rounding):tt=c?s+(f.e-e.e)+1:s,0>tt)ut.push(1),ot=!0;else{if(tt=tt/it+2|0,w=0,1==d){for(y=0,v=v[0],tt++;(st>w||y)&&tt--;w++)vt=y*l+(k[w]||0),ut[w]=vt/v|0,y=vt%v|0;ot=y||st>w}else{for(y=l/(v[0]+1)|0,y>1&&(v=n(v,y,l),k=n(k,y,l),d=v.length,st=k.length),ct=d,p=k.slice(0,d),b=p.length;d>b;)p[b++]=0;lt=v.slice();lt.unshift(0);yt=v[0];v[1]>=l/2&&++yt;do y=0,g=t(v,p,d,b),0>g?(ht=p[0],d!=b&&(ht=ht*l+(p[1]||0)),y=ht/yt|0,y>1?(y>=l&&(y=l-1),nt=n(v,y,l),ft=nt.length,b=p.length,g=t(nt,p,ft,b),1==g&&(y--,u(nt,ft>d?lt:v,ft,l))):(0==y&&(g=y=1),nt=v.slice()),ft=nt.length,b>ft&&nt.unshift(0),u(p,nt,b,l),-1==g&&(b=p.length,g=t(v,p,d,b),1>g&&(y++,u(p,b>d?lt:v,b,l))),b=p.length):0===g&&(y++,p=[0]),ut[w++]=y,g&&p[0]?p[b++]=k[ct]||0:(p=[k[ct]],b=1);while((ct++=10;y/=10)w++;rt.e=w+et*it-1;i(rt,c?s+rt.e+1:s,h,ot)}return rt}}();c=dt(c);ut=new c(ut);ft=new c(ft);Bridge.$Decimal=c;"function"==typeof define&&define.amd?define(function(){return c}):"undefined"!=typeof module&&module.exports?module.exports=c["default"]=c.Decimal=c:(n||(n="undefined"!=typeof self&&self&&self.self==self?self:Function("return this")()),ni=n.Decimal,c.noConflict=function(){return n.Decimal=ni,c})}(Bridge.global);System.Decimal=function(n,t,i){var r;if(this.constructor!==System.Decimal)return new System.Decimal(n,t,i);if(n==null&&(n=0),typeof n=="string"){if(t=t||System.Globalization.CultureInfo.getCurrentCulture(),r=t&&t.getFormat(System.Globalization.NumberFormatInfo),r&&r.numberDecimalSeparator!=="."&&(n=n.replace(r.numberDecimalSeparator,".")),!/^\s*[+-]?(\d+|\d+.|\d*\.\d+)((e|E)[+-]?\d+)?\s*$/.test(n))throw new System.FormatException;n=n.replace(/\s/g,"")}if(i&&i.precision&&typeof n=="number"){var f=Bridge.Int.trunc(n),e=(f+"").length,u=i.precision-e;u<0&&(u=0);n=n.toFixed(u)}this.value=System.Decimal.getValue(n)};System.Decimal.$$name="System.Decimal";System.Decimal.prototype.$$name="System.Decimal";System.Decimal.$kind="struct";System.Decimal.prototype.$kind="struct";System.Decimal.$$inherits=[];Bridge.Class.addExtend(System.Decimal,[System.IComparable,System.IFormattable,System.IComparable$1(System.Decimal),System.IEquatable$1(System.Decimal)]);System.Decimal.$is=function(n){return n instanceof System.Decimal};System.Decimal.getDefaultValue=function(){return new System.Decimal(0)};System.Decimal.getValue=function(n){return Bridge.hasValue(n)?n instanceof System.Decimal?n.value:n instanceof System.Int64||n instanceof System.UInt64?new Bridge.$Decimal(n.toString()):new Bridge.$Decimal(n):this.getDefaultValue()};System.Decimal.create=function(n){return Bridge.hasValue(n)?n instanceof System.Decimal?n:new System.Decimal(n):null};System.Decimal.lift=function(n){return n==null?null:System.Decimal.create(n)};System.Decimal.prototype.toString=function(n,t){return!n&&!t?this.value.toString():Bridge.Int.format(this,n,t)};System.Decimal.prototype.toFloat=function(){return this.value.toNumber()};System.Decimal.prototype.toJSON=function(){return this.value.toNumber()};System.Decimal.prototype.format=function(n,t){return Bridge.Int.format(this,n,t)};System.Decimal.prototype.decimalPlaces=function(){return this.value.decimalPlaces()};System.Decimal.prototype.dividedToIntegerBy=function(n){return new System.Decimal(this.value.dividedToIntegerBy(System.Decimal.getValue(n)))};System.Decimal.prototype.exponential=function(){return new System.Decimal(this.value.exponential())};System.Decimal.prototype.abs=function(){return new System.Decimal(this.value.abs())};System.Decimal.prototype.floor=function(){return new System.Decimal(this.value.floor())};System.Decimal.prototype.ceil=function(){return new System.Decimal(this.value.ceil())};System.Decimal.prototype.trunc=function(){return new System.Decimal(this.value.trunc())};System.Decimal.round=function(n,t){var i,r;return n=System.Decimal.create(n),i=Bridge.$Decimal.rounding,Bridge.$Decimal.rounding=t,r=new System.Decimal(n.value.round()),Bridge.$Decimal.rounding=i,r};System.Decimal.toDecimalPlaces=function(n,t,i){n=System.Decimal.create(n);return new System.Decimal(n.value.toDecimalPlaces(t,i))};System.Decimal.prototype.compareTo=function(n){return this.value.comparedTo(System.Decimal.getValue(n))};System.Decimal.prototype.add=function(n){return new System.Decimal(this.value.plus(System.Decimal.getValue(n)))};System.Decimal.prototype.sub=function(n){return new System.Decimal(this.value.minus(System.Decimal.getValue(n)))};System.Decimal.prototype.isZero=function(){return this.value.isZero};System.Decimal.prototype.mul=function(n){return new System.Decimal(this.value.times(System.Decimal.getValue(n)))};System.Decimal.prototype.div=function(n){return new System.Decimal(this.value.dividedBy(System.Decimal.getValue(n)))};System.Decimal.prototype.mod=function(n){return new System.Decimal(this.value.modulo(System.Decimal.getValue(n)))};System.Decimal.prototype.neg=function(){return new System.Decimal(this.value.negated())};System.Decimal.prototype.inc=function(){return new System.Decimal(this.value.plus(System.Decimal.getValue(1)))};System.Decimal.prototype.dec=function(){return new System.Decimal(this.value.minus(System.Decimal.getValue(1)))};System.Decimal.prototype.sign=function(){return this.value.isZero()?0:this.value.isNegative()?-1:1};System.Decimal.prototype.clone=function(){return new System.Decimal(this)};System.Decimal.prototype.ne=function(n){return!!this.compareTo(n)};System.Decimal.prototype.lt=function(n){return this.compareTo(n)<0};System.Decimal.prototype.lte=function(n){return this.compareTo(n)<=0};System.Decimal.prototype.gt=function(n){return this.compareTo(n)>0};System.Decimal.prototype.gte=function(n){return this.compareTo(n)>=0};System.Decimal.prototype.equals=function(n){return!this.compareTo(n)};System.Decimal.prototype.equalsT=function(n){return!this.compareTo(n)};System.Decimal.prototype.getHashCode=function(){for(var n=this.sign()*397+this.value.e|0,t=0;t0&&h>0){for(u=h%f||f,r=s.substr(0,u);u0&&(r+=a+s.slice(u));l&&(r="-"+r)}return c?r+i.decimalSeparator+((e=+i.fractionGroupSize)?c.replace(new RegExp("\\d{"+e+"}\\B","g"),"$&"+i.fractionGroupSeparator):c):r};System.Decimal.prototype.toFormat=function(n,t,i){var r={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0},f,u;return i&&!i.getFormat?(r=Bridge.merge(r,i),f=this._toFormat(n,t,r)):(i=i||System.Globalization.CultureInfo.getCurrentCulture(),u=i&&i.getFormat(System.Globalization.NumberFormatInfo),u&&(r.decimalSeparator=u.numberDecimalSeparator,r.groupSeparator=u.numberGroupSeparator,r.groupSize=u.numberGroupSizes[0]),f=this._toFormat(n,t,r)),f};Bridge.$Decimal.config({precision:29});System.Decimal.Zero=System.Decimal(0);System.Decimal.One=System.Decimal(1);System.Decimal.MinusOne=System.Decimal(-1);System.Decimal.MinValue=System.Decimal("-79228162514264337593543950335");System.Decimal.MaxValue=System.Decimal("79228162514264337593543950335");System.Decimal.precision=29;Bridge.define("System.DayOfWeek",{$kind:"enum",$statics:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6}});pt={getDefaultValue:function(){return new Date(-864e13)},utcNow:function(){var n=new Date;return new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())},today:function(){var n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate())},timeOfDay:function(n){return new System.TimeSpan((n-new Date(n.getFullYear(),n.getMonth(),n.getDate()))*1e4)},isUseGenitiveForm:function(n,t,i,r){for(var f=0,u=t-1;u>=0&&n[u]!==r;u--);if(u>=0){while(--u>=0&&n[u]===r)f++;if(f<=1)return!0}for(u=t+i;u=0?"-":"+")+Math.floor(Math.abs(p));break;case"zz":case"zzz":p=s/60;p=(p>=0?"-":"+")+System.String.alignString(Math.floor(Math.abs(p)).toString(),2,"0",2);n==="zzz"&&(p+=r.timeSeparator+System.String.alignString(Math.floor(Math.abs(s%60)).toString(),2,"0",2));break;case":":p=r.timeSeparator;break;case"/":p=r.dateSeparator;break;default:p=n.substr(1,n.length-1-(n.charAt(0)!=="\\"))}return p})},parse:function(n,t,i,r){var u=this.parseExact(n,null,t,i,!0);if(u!==null)return u;if(u=Date.parse(n),isNaN(u)){if(!r)throw new System.FormatException("String does not contain a valid string representation of a date and time.");}else return new Date(u)},parseExact:function(n,t,i,r,u){var ft,ct;if(t||(t=["G","g","F","f","D","d","R","r","s","S","U","u","O","o","Y","y","M","m","T","t"]),Bridge.isArray(t)){for(ft=0,ft;ft30?1900:2e3)+c)}else if(f==="MMM"||f==="MMMM"){for(l=0,ut=f==="MMM"?this.isUseGenitiveForm(t,k,3,"d")?y.abbreviatedMonthGenitiveNames:y.abbreviatedMonthNames:this.isUseGenitiveForm(t,k,4,"d")?y.monthGenitiveNames:y.monthNames,b=0;b12){o=!0;break}}else if(f==="MM"||f==="M"){if(l=this.subparseInt(n,e,f.length,2),l==null||l<1||l>12){o=!0;break}e+=l.length}else if(f==="dddd"||f==="ddd"){for(ut=f==="ddd"?y.abbreviatedDayNames:y.dayNames,b=0;b31){o=!0;break}e+=w.length}else if(f==="hh"||f==="h"){if(h=this.subparseInt(n,e,f.length,2),h==null||h<1||h>12){o=!0;break}e+=h.length}else if(f==="HH"||f==="H"){if(h=this.subparseInt(n,e,f.length,2),h==null||h<0||h>23){o=!0;break}e+=h.length}else if(f==="mm"||f==="m"){if(d=this.subparseInt(n,e,f.length,2),d==null||d<0||d>59)return null;e+=d.length}else if(f==="ss"||f==="s"){if(g=this.subparseInt(n,e,f.length,2),g==null||g<0||g>59){o=!0;break}e+=g.length}else if(f==="u"){if(v=this.subparseInt(n,e,1,7),v==null){o=!0;break}e+=v.length;v.length>3&&(v=v.substring(0,3))}else if(f==="fffffff"||f==="ffffff"||f==="fffff"||f==="ffff"||f==="fff"||f==="ff"||f==="f"){if(v=this.subparseInt(n,e,f.length,7),v==null){o=!0;break}e+=v.length;v.length>3&&(v=v.substring(0,3))}else if(f==="t"){if(n.substring(e,e+1).toLowerCase()===et.charAt(0).toLowerCase())nt=et;else if(n.substring(e,e+1).toLowerCase()===ot.charAt(0).toLowerCase())nt=ot;else{o=!0;break}e+=1}else if(f==="tt"){if(n.substring(e,e+2).toLowerCase()===et.toLowerCase())nt=et;else if(n.substring(e,e+2).toLowerCase()===ot.toLowerCase())nt=ot;else{o=!0;break}e+=2}else if(f==="z"||f==="zz"){if(it=n.charAt(e),it==="-")rt=!0;else if(it==="+")rt=!1;else{o=!0;break}if(e++,a=this.subparseInt(n,e,1,2),a==null||a>14){o=!0;break}e+=a.length;rt&&(a=-a)}else if(f==="zzz"){if(s=n.substring(e,e+6),e+=6,s.length!==6){o=!0;break}if(it=s.charAt(0),it==="-")rt=!0;else if(it==="+")rt=!1;else{o=!0;break}if(tt=1,a=this.subparseInt(s,tt,1,2),a==null||a>14){o=!0;break}if(tt+=a.length,rt&&(a=-a),s.charAt(tt)!==y.timeSeparator){o=!0;break}if(tt++,ht=this.subparseInt(s,tt,1,2),ht==null||a>59){o=!0;break}}else lt=!1;if(p||!lt){if(s=n.substring(e,e+f.length),!p&&(f===":"&&s!==y.timeSeparator||f==="/"&&s!==y.dateSeparator)||s!==f&&f!=="'"&&f!=='"'&&f!=="\\"){o=!0;break}if(p==="\\"&&(p=!1),f!=="'"&&f!=='"'&&f!=="\\")e+=f.length;else if(p===!1)p=f;else{if(p!==f){o=!0;break}p=!1}}}if(p&&(o=!0),o||(e!==n.length?o=!0:l===2?c%4==0&&c%100!=0||c%400==0?w>29&&(o=!0):w>28&&(o=!0):(l===4||l===6||l===9||l===11)&&w>30&&(o=!0)),o){if(u)return null;throw new System.FormatException("String does not contain a valid string representation of a date and time.");}return(h<12&&nt===ot?h=+h+12:h>11&&nt===et&&(h-=12),a===0&&ht===0&&!r)?new Date(c,l-1,w,h,d,g,v):new Date(Date.UTC(c,l-1,w,h-a,d-ht,g,v))},subparseInt:function(n,t,i,r){for(var f,u=r;u>=i;u--){if(f=n.substring(t,t+u),f.lengtht:!1},gte:function(n,t){return Bridge.hasValue$1(n,t)?n>=t:!1},lt:function(n,t){return Bridge.hasValue$1(n,t)?n12?this.getHours()-12:this.getHours()===0?12:this.getHours()},add:function(n){return new System.TimeSpan(this.ticks.add(n.ticks))},subtract:function(n){return new System.TimeSpan(this.ticks.sub(n.ticks))},duration:function(){return new System.TimeSpan(this.ticks.abs())},negate:function(){return new System.TimeSpan(this.ticks.neg())},compareTo:function(n){return this.ticks.compareTo(n.ticks)},equals:function(n){return n.ticks.eq(this.ticks)},equalsT:function(n){return n.ticks.eq(this.ticks)},format:function(n,t){return this.toString(n,t)},getHashCode:function(){return this.ticks.getHashCode()},toString:function(n,t){var i=this.ticks,f="",r=this,e=(t||System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo),u=function(n,t,i,r){return System.String.alignString((n|0).toString(),t||2,"0",i||2,r||!1)};return n?n.replace(/(\\.|'[^']*'|"[^"]*"|dd?|HH?|hh?|mm?|ss?|tt?|f{1,7}|\:|\/)/g,function(n){var t=n;switch(n){case"d":return r.getDays();case"dd":return u(r.getDays());case"H":return r.getHours();case"HH":return u(r.getHours());case"h":return r.get12HourHour();case"hh":return u(r.get12HourHour());case"m":return r.getMinutes();case"mm":return u(r.getMinutes());case"s":return r.getSeconds();case"ss":return u(r.getSeconds());case"t":return(r.getHours()<12?e.amDesignator:e.pmDesignator).substring(0,1);case"tt":return r.getHours()<12?e.amDesignator:e.pmDesignator;case"f":case"ff":case"fff":case"ffff":case"fffff":case"ffffff":case"fffffff":return u(r.getMilliseconds(),n.length,1,!0);default:return n.substr(1,n.length-1-(n.charAt(0)!=="\\"))}}):(i.abs().gte(864e9)&&(f+=u(i.toNumberDivided(864e9))+".",i=i.mod(864e9)),f+=u(i.toNumberDivided(36e9))+":",i=i.mod(36e9),f+=u(i.toNumberDivided(6e8)|0)+":",i=i.mod(6e8),f+=u(i.toNumberDivided(1e7)),i=i.mod(1e7),i.gt(0)&&(f+="."+u(i.toNumber(),7)),f)}});Bridge.Class.addExtend(System.TimeSpan,[System.IComparable$1(System.TimeSpan),System.IEquatable$1(System.TimeSpan)]);Bridge.define("System.Text.StringBuilder",{ctor:function(){this.$initialize();this.buffer=[];this.capacity=16;arguments.length===1?this.append(arguments[0]):arguments.length===2?(this.append(arguments[0]),this.setCapacity(arguments[1])):arguments.length===3&&this.append(arguments[0],arguments[1],arguments[2])},getLength:function(){if(this.buffer.length<2)return this.buffer[0]?this.buffer[0].length:0;var n=this.buffer.join("");return this.buffer=[],this.buffer[0]=n,n.length},getCapacity:function(){var n=this.getLength();return this.capacity>n?this.capacity:n},setCapacity:function(n){var t=this.getLength();n>t&&(this.capacity=n)},toString:function(){var n=this.buffer.join(""),t,i;return(this.buffer=[],this.buffer[0]=n,arguments.length===2)?(t=arguments[0],i=arguments[1],this.checkLimits(n,t,i),n.substr(t,i)):n},append:function(n){var i,t;if(n==null)return this;if(arguments.length===2){if(t=arguments[1],t===0)return this;if(t<0)throw new System.ArgumentOutOfRangeException("count","cannot be less than zero");n=Array(t+1).join(n).toString()}else if(arguments.length===3){if(i=arguments[1],t=arguments[2],t===0)return this;this.checkLimits(n,i,t);n=n.substr(i,t)}return this.buffer[this.buffer.length]=n,this},appendFormat:function(){return this.append(System.String.format.apply(System.String,arguments))},clear:function(){return this.buffer=[],this},appendLine:function(){return arguments.length===1&&this.append(arguments[0]),this.append("\r\n")},equals:function(n){return n==null?!1:n===this?!0:this.toString()===n.toString()},remove:function(n,t){var i=this.buffer.join("");return(this.checkLimits(i,n,t),i.length===t&&n===0)?this.clear():(t>0&&(this.buffer=[],this.buffer[0]=i.substring(0,n),this.buffer[1]=i.substring(n+t,i.length)),this)},insert:function(n,t){var r,i;if(t==null)return this;if(arguments.length===3){if(r=arguments[2],r===0)return this;if(r<0)throw new System.ArgumentOutOfRangeException("count","cannot be less than zero");t=Array(r+1).join(t).toString()}return i=this.buffer.join(""),this.buffer=[],n<1?(this.buffer[0]=t,this.buffer[1]=i):n>=i.length?(this.buffer[0]=i,this.buffer[1]=t):(this.buffer[0]=i.substring(0,n),this.buffer[1]=t,this.buffer[2]=i.substring(n,i.length)),this},replace:function(n,t){var f=new RegExp(n,"g"),i=this.buffer.join("");if(this.buffer=[],arguments.length===4){var r=arguments[2],u=arguments[3],e=i.substr(r,u);this.checkLimits(i,r,u);this.buffer[0]=i.substring(0,r);this.buffer[1]=e.replace(f,t);this.buffer[2]=i.substring(r+u,i.length)}else this.buffer[0]=i.replace(f,t);return this},checkLimits:function(n,t,i){if(i<0)throw new System.ArgumentOutOfRangeException("length","must be non-negative");if(t<0)throw new System.ArgumentOutOfRangeException("startIndex","startIndex cannot be less than zero");if(i>n.length-t)throw new System.ArgumentOutOfRangeException("Index and length must refer to a location within the string");}}),function(){var n=RegExp("[-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]","g"),t=function(t){return t.replace(n,"\\$&")};Bridge.regexpEscape=t}();System.Diagnostics.Debug={writeln:function(n){Bridge.Console.debug(n)},_fail:function(n){System.Diagnostics.Debug.writeln(n)},assert:function(n,t){n||(t="Assert failed: "+t,confirm(t+"\r\n\r\nBreak into debugger?")&&System.Diagnostics.Debug._fail(t))},fail:function(n){System.Diagnostics.Debug._fail(n)}};Bridge.define("System.Diagnostics.Stopwatch",{ctor:function(){this.$initialize();this._stopTime=System.Int64.Zero;this._startTime=System.Int64.Zero;this.isRunning=!1},reset:function(){this._stopTime=this._startTime=System.Diagnostics.Stopwatch.getTimestamp();this.isRunning=!1},ticks:function(){return(this.isRunning?System.Diagnostics.Stopwatch.getTimestamp():this._stopTime).sub(this._startTime)},milliseconds:function(){return this.ticks().mul(1e3).div(System.Diagnostics.Stopwatch.frequency)},timeSpan:function(){return new System.TimeSpan(this.milliseconds().mul(1e4))},start:function(){this.isRunning||(this._startTime=System.Diagnostics.Stopwatch.getTimestamp(),this.isRunning=!0)},stop:function(){this.isRunning&&(this._stopTime=System.Diagnostics.Stopwatch.getTimestamp(),this.isRunning=!1)},restart:function(){this.isRunning=!1;this.start()},statics:{startNew:function(){var n=new System.Diagnostics.Stopwatch;return n.start(),n}}});typeof window!="undefined"&&window.performance&&window.performance.now?(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e6),System.Diagnostics.Stopwatch.isHighResolution=!0,System.Diagnostics.Stopwatch.getTimestamp=function(){return new System.Int64(Math.round(window.performance.now()*1e3))}):typeof process!="undefined"&&process.hrtime?(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e9),System.Diagnostics.Stopwatch.isHighResolution=!0,System.Diagnostics.Stopwatch.getTimestamp=function(){var n=process.hrtime();return new System.Int64(n[0]).mul(1e9).add(n[1])}):(System.Diagnostics.Stopwatch.frequency=new System.Int64(1e3),System.Diagnostics.Stopwatch.isHighResolution=!1,System.Diagnostics.Stopwatch.getTimestamp=function(){return new System.Int64((new Date).valueOf())});System.Diagnostics.Contracts.Contract={reportFailure:function(n,t,i,r,u){var f=i.toString(),e,o;if(f=f.substring(f.indexOf("return")+7),f=f.substr(0,f.lastIndexOf(";")),e=f?"Contract '"+f+"' failed":"Contract failed",o=t?e+": "+t:e,u)throw new u(f,t);else throw new System.Diagnostics.Contracts.ContractException(n,o,t,f,r);},assert:function(n,t,i){t()||System.Diagnostics.Contracts.Contract.reportFailure(n,i,t,null)},requires:function(n,t,i){t()||System.Diagnostics.Contracts.Contract.reportFailure(0,i,t,null,n)},forAll:function(n,t,i){if(!i)throw new System.ArgumentNullException("predicate");for(;n=(n.$s?n.$s[0]:n.length))throw new System.ArgumentException("Index 0 out of range");var r=t[0],i;if(n.$s)for(i=1;i=n.$s[i])throw new System.ArgumentException("Index "+i+" out of range");r=r*n.$s[i]+t[i]}return r},$get:function(n){var t=this[System.Array.toIndex(this,n)];return typeof t!="undefined"?t:this.$v},get:function(n){var t,i,r;if(arguments.length<2)throw new System.ArgumentNullException("indices");for(t=Array.prototype.slice.call(arguments,1),i=0;i=(n.$s?n.$s.length:1))throw new System.IndexOutOfRangeException;return n.$s?n.$s[t]:n.length},getRank:function(n){return n.$s?n.$s.length:1},getLower:function(n,t){return System.Array.getLength(n,t),0},create:function(n,t,i,r){if(r===null)throw new System.ArgumentNullException("length");var u=[],a=arguments.length>3?1:0,f,s,h,e,o,c,l;if(u.$v=n,u.$s=[],u.get=System.Array.$get,u.set=System.Array.$set,r&&Bridge.isArray(r))for(f=0;f=0;s--)o=l%u.$s[s],c.unshift(o),l=Bridge.Int.div(l-o,u.$s[s]);for(h=t,o=0;on.length)throw new System.IndexOutOfRangeException;for(var u=Bridge.isFunction(t);--r>=0;)n[i+r]=u?t():t},copy:function(n,t,i,r,u){if(!i)throw new System.ArgumentNullException("dest","Value cannot be null");if(!n)throw new System.ArgumentNullException("src","Value cannot be null");if(t<0||r<0||u<0)throw new System.ArgumentOutOfRangeException("Number was less than the array's lower bound in the first dimension");if(u>n.length-t||u>i.length-r)throw new System.ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds");if(t=0)i[r+u]=n[t+u];else for(var f=0;f-1:i&&Bridge.isFunction(n[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$contains"])||Bridge.isFunction(n[r="System$Collections$IList$contains"])?n[r](t):Bridge.isFunction(n.contains)?n.contains(t):!1},remove:function(n,t,i){var r,u;if(Bridge.isArray(n)){if(u=System.Array.indexOf(n,t),u>-1)return n.splice(u,1),!0}else{if(i&&Bridge.isFunction(n[r="System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(i)+"$remove"])||Bridge.isFunction(n[r="System$Collections$IList$remove"]))return n[r](t);if(Bridge.isFunction(n.remove))return n.remove(t)}return!1},insert:function(n,t,i,r){var u;Bridge.isArray(n)?n.splice(t,0,i):r&&Bridge.isFunction(n[u="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(r)+"$insert"])?n[u](t,i):Bridge.isFunction(n[u="System$Collections$IList$insert"])?n[u](t,i):Bridge.isFunction(n.insert)&&n.insert(t,i)},removeAt:function(n,t,i){var r;Bridge.isArray(n)?n.splice(t,1):i&&Bridge.isFunction(n[r="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(i)+"$removeAt"])?n[r](t):Bridge.isFunction(n[r="System$Collections$IList$removeAt"])?n[r](t):Bridge.isFunction(n.removeAt)&&n.removeAt(t)},getItem:function(n,t,i){var r;return Bridge.isArray(n)?n[t]:Bridge.isFunction(n.get)?n.get(t):Bridge.isFunction(n.getItem)?n.getItem(t):i&&Bridge.isFunction(n[r="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(i)+"$getItem"])||Bridge.isFunction(n[r="System$Collections$IList$$getItem"])?n[r](t):Bridge.isFunction(n.get_Item)?n.get_Item(t):void 0},setItem:function(n,t,i,r){var u;if(Bridge.isArray(n))n[t]=i;else if(Bridge.isFunction(n.set))n.set(t,i);else if(Bridge.isFunction(n.setItem))n.setItem(t,i);else{if(r&&Bridge.isFunction(n[u="System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(r)+"$setItem"])||r&&Bridge.isFunction(n[u="System$Collections$IList$setItem"]))return n[u](t,i);Bridge.isFunction(n.set_Item)&&n.set_Item(t,i)}},resize:function(n,t,i){var u;if(t<0)throw new System.ArgumentOutOfRangeException("newSize",null,null,t);var f=0,e=Bridge.isFunction(i),r=n.v;for(r?(f=r.length,r.length=t):r=new Array(t),u=f;u>1);try{h=u.compare(n[e],r)}catch(c){throw new System.InvalidOperationException("Failed to compare two elements in the array.",c);}if(h===0)return e;h<0?f=e+1:s=e-1}return~f},sort:function(n,t,i,r){var f,u;if(!n)throw new System.ArgumentNullException("array");if(arguments.length===2&&typeof t=="object"&&(r=t,t=null),Bridge.isNumber(t)||(t=0),Bridge.isNumber(i)||(i=n.length),r||(r=System.Collections.Generic.Comparer$1.$default),t===0&&i===n.length)n.sort(Bridge.fn.bind(r,r.compare));else for(f=n.slice(t,t+i),f.sort(Bridge.fn.bind(r,r.compare)),u=t;ur||r>t)||n[i]>t||(r=n[i]);return r},addRange:function(n,t){if(Bridge.isArray(t))n.push.apply(n,t);else{var i=Bridge.getEnumerator(t);try{while(i.moveNext())n.push(i.getCurrent())}finally{Bridge.is(i,System.IDisposable)&&i.dispose()}}},convertAll:function(n,t){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException("converter");return n.map(t)},find:function(n,t,i){if(!Bridge.hasValue(t))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(i))throw new System.ArgumentNullException("match");for(var r=0;rn.length)throw new System.ArgumentOutOfRangeException("startIndex");if(i<0||t>n.length-i)throw new System.ArgumentOutOfRangeException("count");if(!Bridge.hasValue(r))throw new System.ArgumentNullException("match");for(f=t+i,u=t;u=0;r--)if(i(t[r]))return t[r];return Bridge.getDefaultValue(n)},findLastIndex:function(n,t,i,r){var f,u;if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(arguments.length===2?(r=t,t=n.length-1,i=n.length):arguments.length===3&&(r=i,i=t+1),!Bridge.hasValue(r))throw new System.ArgumentNullException("match");if(n.length===0){if(t!==-1)throw new System.ArgumentOutOfRangeException("startIndex");}else if(t<0||t>=n.length)throw new System.ArgumentOutOfRangeException("startIndex");if(i<0||t-i+1<0)throw new System.ArgumentOutOfRangeException("count");for(f=t-i,u=t;u>f;u--)if(r(n[u]))return u;return-1},forEach:function(n,t){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException("action");for(var i=0;i=n.length&&n.length>0)throw new System.ArgumentOutOfRangeException("startIndex","out of range");if(r<0||r>n.length-i)throw new System.ArgumentOutOfRangeException("count","out of range");return System.Array.indexOf(n,t,i,r)},lastIndexOfT:function(n,t,i,r){var e,u,f;if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(arguments.length===2?(i=n.length-1,r=n.length):arguments.length===3&&(r=n.length===0?0:i+1),i<0||i>=n.length&&n.length>0)throw new System.ArgumentOutOfRangeException("startIndex","out of range");if(r<0||i-r+1<0)throw new System.ArgumentOutOfRangeException("count","out of range");for(e=i-r+1,u=i;u>=e;u--)if(f=n[u],f===t||System.Collections.Generic.EqualityComparer$1.$default.equals2(f,t))return u;return-1},trueForAll:function(n,t){if(!Bridge.hasValue(n))throw new System.ArgumentNullException("array");if(!Bridge.hasValue(t))throw new System.ArgumentNullException("match");for(var i=0;i=this.entries[r[t]].length-1)&&(i=-1,t++),t>=r.length)?!1:(i++,!0)},function(){return n(this.entries[r[t]][i])},function(){t=-1},null,this)},getEnumerator:function(){return this.getCustomEnumerator(function(n){return n})}}});Bridge.define("System.Collections.Generic.DictionaryCollection$1",function(n){return{inherits:[System.Collections.Generic.ICollection$1(n)],config:{alias:["getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(n)+"$getEnumerator","getCount","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$getCount","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$contains","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$remove"]},ctor:function(n,t){this.$initialize();this.dictionary=n;this.keys=t},getCount:function(){return this.dictionary.getCount()},getEnumerator:function(){return this.dictionary.getCustomEnumerator(this.keys?function(n){return n.key}:function(n){return n.value})},contains:function(n){return this.keys?this.dictionary.containsKey(n):this.dictionary.containsValue(n)},add:function(){throw new System.NotSupportedException;},clear:function(){throw new System.NotSupportedException;},remove:function(){throw new System.NotSupportedException;}}});Bridge.define("System.Collections.Generic.List$1",function(n){return{inherits:[System.Collections.Generic.IList$1(n),System.Collections.IList],config:{alias:["getItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$getItem","getItem","System$Collections$IList$getItem","setItem","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$setItem","setItem","System$Collections$IList$setItem","getCount","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$getCount","getCount","System$Collections$ICollection$getCount","getIsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$getIsReadOnly","getIsReadOnly","System$Collections$IList$getIsReadOnly","add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$add","add","System$Collections$IList$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$clear","clear","System$Collections$IList$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$contains","contains","System$Collections$IList$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$copyTo","copyTo","System$Collections$ICollection$copyTo","getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(n)+"$getEnumerator","getEnumerator","System$Collections$IEnumerable$getEnumerator","indexOf","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$indexOf","indexOf","System$Collections$IList$indexOf","insert","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$insert","insert","System$Collections$IList$insert","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(n)+"$remove","remove","System$Collections$IList$remove","removeAt","System$Collections$Generic$IList$1$"+Bridge.getTypeAlias(n)+"$removeAt","removeAt","System$Collections$IList$removeAt"]},ctor:function(n){this.$initialize();this.items=Object.prototype.toString.call(n)==="[object Array]"?System.Array.clone(n):Bridge.is(n,System.Collections.IEnumerable)?Bridge.toArray(n):[];this.clear.$clearCallbacks=[]},checkIndex:function(n){if(n<0||n>this.items.length-1)throw new System.ArgumentOutOfRangeException("Index out of range");},getCount:function(){return this.items.length},getIsReadOnly:function(){return!!this.readOnly},get:function(n){return this.checkIndex(n),this.items[n]},getItem:function(n){return this.get(n)},set:function(n,t){this.checkReadOnly();this.checkIndex(n);this.items[n]=t},setItem:function(n,t){this.set(n,t)},add:function(n){this.checkReadOnly();this.items.push(n)},addRange:function(n){this.checkReadOnly();for(var i=Bridge.toArray(n),t=0,r=i.length;t-1},copyTo:function(n,t){System.Array.copy(this.items,0,n,t,this.items.length)},getEnumerator:function(){return new Bridge.ArrayEnumerator(this.items,n)},getRange:function(t,i){Bridge.isDefined(t)||(t=0);Bridge.isDefined(i)||(i=this.items.length);t!==0&&this.checkIndex(t);this.checkIndex(t+i-1);for(var u=[],f=t+i,r=t;r=0;i--)if(n===this.items[i])return i;return-1},remove:function(n){this.checkReadOnly();var t=this.indexOf(n);return t<0?!1:(this.checkIndex(t),this.items.splice(t,1),!0)},removeAt:function(n){this.checkReadOnly();this.checkIndex(n);this.items.splice(n,1)},removeRange:function(n,t){this.checkReadOnly();this.checkIndex(n);this.items.splice(n,t)},reverse:function(){this.checkReadOnly();this.items.reverse()},slice:function(n,t){this.checkReadOnly();var i=this.$$name.substr(this.$$name.lastIndexOf("$")+1);return new(System.Collections.Generic.List$1(Bridge.unroll(i)))(this.items.slice(n,t))},sort:function(n){this.checkReadOnly();this.items.sort(n||System.Collections.Generic.Comparer$1.$default.compare)},splice:function(n,t,i){this.checkReadOnly();this.items.splice(n,t,i)},unshift:function(){this.checkReadOnly();this.items.unshift()},toArray:function(){return Bridge.toArray(this)},checkReadOnly:function(){if(this.readOnly)throw new System.NotSupportedException;},binarySearch:function(n,t,i,r){return arguments.length===1&&(i=n,n=null),arguments.length===2&&(i=n,r=t,n=null,t=null),Bridge.isNumber(n)||(n=0),Bridge.isNumber(t)||(t=this.items.length),r||(r=System.Collections.Generic.Comparer$1.$default),System.Array.binarySearch(this.items,n,t,i,r)},convertAll:function(n,t){var r,i;if(!Bridge.hasValue(t))throw new System.ArgumentNullException("converter is null.");for(r=new(System.Collections.Generic.List$1(n))(this.items.length),i=0;i0?t.setException(u):e?t.setCanceled():t.setResult(r))})})(i);return t.task},whenAny:function(n){if(Bridge.is(n,System.Collections.IEnumerable)?n=Bridge.toArray(n):Bridge.isArray(n)||(n=Array.prototype.slice.call(arguments,0)),!n.length)throw new System.ArgumentException("At least one task is required");for(var t=new System.Threading.Tasks.TaskCompletionSource,i=0;i=0?n:arguments.length+n]}}(t):typeof t!="function"&&(t=function(){return Array.prototype.slice.call(arguments,0)}),n.then(function(){u.setResult(t?t.apply(null,arguments):Array.prototype.slice.call(arguments,0))},function(){u.setException(i?i.apply(null,arguments):new Bridge.PromiseException(Array.prototype.slice.call(arguments,0)))},r),u.task}},continueWith:function(n,t){var i=new System.Threading.Tasks.TaskCompletionSource,r=this,u=t?function(){i.setResult(n(r))}:function(){try{i.setResult(n(r))}catch(t){i.setException(System.Exception.create(t))}};return this.isCompleted()?setTimeout(u,0):this.callbacks.push(u),i.task},start:function(){if(this.status!==System.Threading.Tasks.TaskStatus.created)throw new System.InvalidOperationException("Task was already started.");var n=this;this.status=System.Threading.Tasks.TaskStatus.running;setTimeout(function(){try{var t=n.action(n.state);delete n.action;delete n.state;n.complete(t)}catch(i){n.fail(new System.AggregateException(null,[System.Exception.create(i)]))}},0)},runCallbacks:function(){var n=this;setTimeout(function(){for(var t=0;t0?this.exception.innerExceptions.get(0):null:this.exception;default:throw new System.InvalidOperationException("Task is not yet completed.");}},getResult:function(){return this._getResult(!1)},dispose:function(){},getAwaiter:function(){return this},getAwaitedResult:function(){return this._getResult(!0)}});Bridge.define("System.Threading.Tasks.TaskStatus",{$kind:"enum",$statics:{created:0,waitingForActivation:1,waitingToRun:2,running:3,waitingForChildrenToComplete:4,ranToCompletion:5,canceled:6,faulted:7}});Bridge.define("System.Threading.Tasks.TaskCompletionSource",{ctor:function(){this.$initialize();this.task=new System.Threading.Tasks.Task;this.task.status=System.Threading.Tasks.TaskStatus.running},setCanceled:function(){if(!this.task.cancel())throw new System.InvalidOperationException("Task was already completed.");},setResult:function(n){if(!this.task.complete(n))throw new System.InvalidOperationException("Task was already completed.");},setException:function(n){if(!this.trySetException(n))throw new System.InvalidOperationException("Task was already completed.");},trySetCanceled:function(){return this.task.cancel()},trySetResult:function(n){return this.task.complete(n)},trySetException:function(n){return Bridge.is(n,System.Exception)&&(n=[n]),this.task.fail(new System.AggregateException(null,n))}});Bridge.define("System.Threading.CancellationTokenSource",{inherits:[System.IDisposable],config:{alias:["dispose","System$IDisposable$dispose"]},ctor:function(n){this.$initialize();this.timeout=typeof n=="number"&&n>=0?setTimeout(Bridge.fn.bind(this,this.cancel),n,-1):null;this.isCancellationRequested=!1;this.token=new System.Threading.CancellationToken(this);this.handlers=[]},cancel:function(n){var i,r,t;if(!this.isCancellationRequested){for(this.isCancellationRequested=!0,i=[],r=this.handlers,this.clean(),t=0;t0&&n!==-1)throw new System.AggregateException(null,i);}},cancelAfter:function(n){this.isCancellationRequested||(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(Bridge.fn.bind(this,this.cancel),n,-1))},register:function(n,t){if(this.isCancellationRequested)return n(t),new System.Threading.CancellationTokenRegistration;var i={f:n,s:t};return this.handlers.push(i),new System.Threading.CancellationTokenRegistration(this,i)},deregister:function(n){var t=this.handlers.indexOf(n);t>=0&&this.handlers.splice(t,1)},dispose:function(){this.clean()},clean:function(){if(this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.handlers=[],this.links){for(var n=0;n19)return!1;r=/[^0-9 \-]+/;e=!0}if(!r.test(n))return!1;for(n=n.split(e?"-":/[- ]/).join(""),u=0,i=2-n.length%2;i<=n.length;i+=2)u+=parseInt(n.charAt(i-1));for(i=n.length%2+1;i0)},parse:function(n){if(n==null)throw new System.ArgumentNullException("input");var t={v:new System.Version.VersionResult};if(t.v.init("input",!0),!System.Version.tryParseVersion(n,t))throw t.v.getVersionParseException();return t.v.m_parsedVersion},tryParse:function(n,t){var i={v:new System.Version.VersionResult},r;return i.v.init("input",!1),r=System.Version.tryParseVersion(n,i),t.v=i.v.m_parsedVersion,r},tryParseVersion:function(n,t){var u={},f={},e={},o={},r,i;if(n==null)return t.v.setFailure(System.Version.ParseFailureKind.ArgumentNullException),!1;if(r=n.split(System.Version.separatorsArray),i=r.length,i<2||i>4)return t.v.setFailure(System.Version.ParseFailureKind.ArgumentException),!1;if(!System.Version.tryParseComponent(r[0],"version",t,u)||!System.Version.tryParseComponent(r[1],"version",t,f))return!1;if(i=i-2|0,i>0){if(!System.Version.tryParseComponent(r[2],"build",t,e))return!1;if(i=i-1|0,i>0)if(System.Version.tryParseComponent(r[3],"revision",t,o))t.v.m_parsedVersion=new System.Version.$ctor3(u.v,f.v,e.v,o.v);else return!1;else t.v.m_parsedVersion=new System.Version.$ctor2(u.v,f.v,e.v)}else t.v.m_parsedVersion=new System.Version.$ctor1(u.v,f.v);return!0},tryParseComponent:function(n,t,i,r){return System.Int32.tryParse(n,r)?r.v<0?(i.v.setFailure$1(System.Version.ParseFailureKind.ArgumentOutOfRangeException,t),!1):!0:(i.v.setFailure$1(System.Version.ParseFailureKind.FormatException,n),!1)},op_Equality:function(n,t){return Bridge.referenceEquals(n,null)?Bridge.referenceEquals(t,null):n.equalsT(t)},op_Inequality:function(n,t){return!System.Version.op_Equality(n,t)},op_LessThan:function(n,t){if(n==null)throw new System.ArgumentNullException("v1");return n.compareTo(t)<0},op_LessThanOrEqual:function(n,t){if(n==null)throw new System.ArgumentNullException("v1");return n.compareTo(t)<=0},op_GreaterThan:function(n,t){return System.Version.op_LessThan(t,n)},op_GreaterThanOrEqual:function(n,t){return System.Version.op_LessThanOrEqual(t,n)}},_Major:0,_Minor:0,_Build:-1,_Revision:-1,config:{alias:["clone","System$ICloneable$clone","compareTo","System$IComparable$1$System$Version$compareTo","equalsT","System$IEquatable$1$System$Version$equalsT"]},$ctor3:function(n,t,i,r){if(this.$initialize(),n<0)throw new System.ArgumentOutOfRangeException("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException("minor","Cannot be < 0");if(i<0)throw new System.ArgumentOutOfRangeException("build","Cannot be < 0");if(r<0)throw new System.ArgumentOutOfRangeException("revision","Cannot be < 0");this._Major=n;this._Minor=t;this._Build=i;this._Revision=r},$ctor2:function(n,t,i){if(this.$initialize(),n<0)throw new System.ArgumentOutOfRangeException("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException("minor","Cannot be < 0");if(i<0)throw new System.ArgumentOutOfRangeException("build","Cannot be < 0");this._Major=n;this._Minor=t;this._Build=i},$ctor1:function(n,t){if(this.$initialize(),n<0)throw new System.ArgumentOutOfRangeException("major","Cannot be < 0");if(t<0)throw new System.ArgumentOutOfRangeException("minor","Cannot be < 0");this._Major=n;this._Minor=t},$ctor4:function(n){this.$initialize();var t=System.Version.parse(n);this._Major=t.getMajor();this._Minor=t.getMinor();this._Build=t.getBuild();this._Revision=t.getRevision()},ctor:function(){this.$initialize();this._Major=0;this._Minor=0},getMajor:function(){return this._Major},getMinor:function(){return this._Minor},getBuild:function(){return this._Build},getRevision:function(){return this._Revision},getMajorRevision:function(){return Bridge.Int.sxs(this._Revision>>16&65535)},getMinorRevision:function(){return Bridge.Int.sxs(this._Revision&65535)},clone:function(){var n=new System.Version.ctor;return n._Major=this._Major,n._Minor=this._Minor,n._Build=this._Build,n._Revision=this._Revision,n},compareTo$1:function(n){if(n==null)return 1;var t=Bridge.as(n,System.Version);if(System.Version.op_Equality(t,null))throw new System.ArgumentException("version should be of System.Version type");return this._Major!==t._Major?this._Major>t._Major?1:-1:this._Minor!==t._Minor?this._Minor>t._Minor?1:-1:this._Build!==t._Build?this._Build>t._Build?1:-1:this._Revision!==t._Revision?this._Revision>t._Revision?1:-1:0},compareTo:function(n){return System.Version.op_Equality(n,null)?1:this._Major!==n._Major?this._Major>n._Major?1:-1:this._Minor!==n._Minor?this._Minor>n._Minor?1:-1:this._Build!==n._Build?this._Build>n._Build?1:-1:this._Revision!==n._Revision?this._Revision>n._Revision?1:-1:0},equals:function(n){return this.equalsT(Bridge.as(n,System.Version))},equalsT:function(n){return System.Version.op_Equality(n,null)?!1:this._Major!==n._Major||this._Minor!==n._Minor||this._Build!==n._Build||this._Revision!==n._Revision?!1:!0},getHashCode:function(){var n=0;return n=n|(this._Major&15)<<28,n=n|(this._Minor&255)<<20,n=n|(this._Build&255)<<12,n|this._Revision&4095},toString:function(){return this._Build===-1?this.toString$1(2):this._Revision===-1?this.toString$1(3):this.toString$1(4)},toString$1:function(n){var t;switch(n){case 0:return"";case 1:return this._Major.toString();case 2:return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.toString();default:if(this._Build===-1)throw new System.ArgumentException("Build should be > 0 if fieldCount > 2","fieldCount");if(n===3)return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Build,t),t.toString();if(this._Revision===-1)throw new System.ArgumentException("Revision should be > 0 if fieldCount > 3","fieldCount");if(n===4)return t=new System.Text.StringBuilder,System.Version.appendPositiveNumber(this._Major,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Minor,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Build,t),t.append(String.fromCharCode(46)),System.Version.appendPositiveNumber(this._Revision,t),t.toString();throw new System.ArgumentException("Should be < 5","fieldCount");}}});Bridge.define("System.Version.ParseFailureKind",{$kind:"enum",statics:{ArgumentNullException:0,ArgumentException:1,ArgumentOutOfRangeException:2,FormatException:3}});Bridge.define("System.Version.VersionResult",{$kind:"struct",statics:{getDefaultValue:function(){return new System.Version.VersionResult}},m_parsedVersion:null,m_failure:0,m_exceptionArgument:null,m_argumentName:null,m_canThrow:!1,ctor:function(){this.$initialize()},init:function(n,t){this.m_canThrow=t;this.m_argumentName=n},setFailure:function(n){this.setFailure$1(n,"")},setFailure$1:function(n,t){if(this.m_failure=n,this.m_exceptionArgument=t,this.m_canThrow)throw this.getVersionParseException();},getVersionParseException:function(){switch(this.m_failure){case System.Version.ParseFailureKind.ArgumentNullException:return new System.ArgumentNullException(this.m_argumentName);case System.Version.ParseFailureKind.ArgumentException:return new System.ArgumentException("VersionString");case System.Version.ParseFailureKind.ArgumentOutOfRangeException:return new System.ArgumentOutOfRangeException(this.m_exceptionArgument,"Cannot be < 0");case System.Version.ParseFailureKind.FormatException:try{System.Int32.parse(this.m_exceptionArgument)}catch(n){n=System.Exception.create(n);var t;if(Bridge.is(n,System.FormatException)||Bridge.is(n,System.OverflowException))return t=n;throw n;}return new System.FormatException("InvalidString");default:return new System.ArgumentException("VersionString")}},getHashCode:function(){return Bridge.addHash([5139482776,this.m_parsedVersion,this.m_failure,this.m_exceptionArgument,this.m_argumentName,this.m_canThrow])},equals:function(n){return Bridge.is(n,System.Version.VersionResult)?Bridge.equals(this.m_parsedVersion,n.m_parsedVersion)&&Bridge.equals(this.m_failure,n.m_failure)&&Bridge.equals(this.m_exceptionArgument,n.m_exceptionArgument)&&Bridge.equals(this.m_argumentName,n.m_argumentName)&&Bridge.equals(this.m_canThrow,n.m_canThrow):!1},$clone:function(n){var t=n||new System.Version.VersionResult;return t.m_parsedVersion=this.m_parsedVersion,t.m_failure=this.m_failure,t.m_exceptionArgument=this.m_exceptionArgument,t.m_argumentName=this.m_argumentName,t.m_canThrow=this.m_canThrow,t}});Bridge.define("System.Attribute",{statics:{getCustomAttributes:function(n,t){if(n==null)throw new System.ArgumentNullException("element");if(t==null)throw new System.ArgumentNullException("attributeType");var i=n.at||[];return t?i.filter(function(n){return Bridge.is(n,t)}):i},getCustomAttributes$1:function(n,t,i){if(n==null)throw new System.ArgumentNullException("element");if(t==null)throw new System.ArgumentNullException("attributeType");return n.getCustomAttributes(t||i)}}});Bridge.define("System.ComponentModel.INotifyPropertyChanged",{$kind:"interface"});Bridge.define("System.ComponentModel.PropertyChangedEventArgs",{ctor:function(n,t,i){this.$initialize();this.propertyName=n;this.newValue=t;this.oldValue=i}});t={};t.convert={typeCodes:{Empty:0,Object:1,DBNull:2,Boolean:3,Char:4,SByte:5,Byte:6,Int16:7,UInt16:8,Int32:9,UInt32:10,Int64:11,UInt64:12,Single:13,Double:14,Decimal:15,DateTime:16,String:18},toBoolean:function(n,i){var r,u;switch(typeof n){case"boolean":return n;case"number":return n!==0;case"string":if(r=n.toLowerCase().trim(),r==="true")return!0;if(r==="false")return!1;throw new System.FormatException("String was not recognized as a valid Boolean.");case"object":if(n==null)return!1;if(n instanceof System.Decimal)return!n.isZero();if(System.Int64.is64Bit(n))return n.ne(0)}return u=t.internal.suggestTypeCode(n),t.internal.throwInvalidCastEx(u,t.convert.typeCodes.Boolean),t.convert.convertToType(t.convert.typeCodes.Boolean,n,i||null)},toChar:function(n,i,r){var u=t.convert.typeCodes,f,e;if(n instanceof System.Decimal&&(n=n.toFloat()),(n instanceof System.Int64||n instanceof System.UInt64)&&(n=n.toNumber()),f=typeof n,r=r||t.internal.suggestTypeCode(n),r===u.String&&n==null&&(f="string"),r!==u.Object)switch(f){case"boolean":t.internal.throwInvalidCastEx(u.Boolean,u.Char);case"number":return e=t.internal.isFloatingType(r),(e||n%1!=0)&&t.internal.throwInvalidCastEx(r,u.Char),t.internal.validateNumberRange(n,u.Char,!0),n;case"string":if(n==null)throw new System.ArgumentNullException("value");if(n.length!==1)throw new System.FormatException("String must be exactly one character long.");return n.charCodeAt(0)}if(r===u.Object||f==="object"){if(n==null)return 0;Bridge.isDate(n)&&t.internal.throwInvalidCastEx(u.DateTime,u.Char)}return t.internal.throwInvalidCastEx(r,t.convert.typeCodes.Char),t.convert.convertToType(u.Char,n,i||null)},toSByte:function(n,i,r){return t.internal.toNumber(n,i||null,t.convert.typeCodes.SByte,r||null)},toByte:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Byte)},toInt16:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Int16)},toUInt16:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.UInt16)},toInt32:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Int32)},toUInt32:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.UInt32)},toInt64:function(n,i){var r=t.internal.toNumber(n,i||null,t.convert.typeCodes.Int64);return new System.Int64(r)},toUInt64:function(n,i){var r=t.internal.toNumber(n,i||null,t.convert.typeCodes.UInt64);return new System.UInt64(r)},toSingle:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Single)},toDouble:function(n,i){return t.internal.toNumber(n,i||null,t.convert.typeCodes.Double)},toDecimal:function(n,i){return n instanceof System.Decimal?n:new System.Decimal(t.internal.toNumber(n,i||null,t.convert.typeCodes.Decimal))},toDateTime:function(n,i){var r=t.convert.typeCodes,u,f;switch(typeof n){case"boolean":t.internal.throwInvalidCastEx(r.Boolean,r.DateTime);case"number":u=t.internal.suggestTypeCode(n);t.internal.throwInvalidCastEx(u,r.DateTime);case"string":return Bridge.Date.parse(n,i||null);case"object":if(n==null)return t.internal.getMinValue(r.DateTime);if(Bridge.isDate(n))return n;n instanceof System.Decimal&&t.internal.throwInvalidCastEx(r.Decimal,r.DateTime);n instanceof System.Int64&&t.internal.throwInvalidCastEx(r.Int64,r.DateTime);n instanceof System.UInt64&&t.internal.throwInvalidCastEx(r.UInt64,r.DateTime)}return f=t.internal.suggestTypeCode(n),t.internal.throwInvalidCastEx(f,t.convert.typeCodes.DateTime),t.convert.convertToType(r.DateTime,n,i||null)},toString:function(n,i,r){var u=t.convert.typeCodes,f=typeof n;switch(f){case"boolean":return n?"True":"False";case"number":return(r||null)===u.Char?String.fromCharCode(n):isNaN(n)?"NaN":(n%1!=0&&(n=parseFloat(n.toPrecision(15))),n.toString());case"string":return n;case"object":return n==null?"":Bridge.isDate(n)?Bridge.Date.format(n,null,i||null):n instanceof System.Decimal?n.isInteger()?n.toFixed(0,4):n.toPrecision(n.precision()):System.Int64.is64Bit(n)?n.toString():n.format?n.format(null,i||null):Bridge.getTypeName(n)}return t.convert.convertToType(t.convert.typeCodes.String,n,i||null)},toNumberInBase:function(n,i,r){var h,o,v,c,b,y,p,u,k,s,e,d;if(i!==2&&i!==8&&i!==10&&i!==16)throw new System.ArgumentException("Invalid Base.");if(h=t.convert.typeCodes,n==null)return r===h.Int64?System.Int64.Zero:r===h.UInt64?System.UInt64.Zero:0;if(n.length===0)throw new System.ArgumentOutOfRangeException("Index was out of range. Must be non-negative and less than the size of the collection.");n=n.toLowerCase();var l=t.internal.getMinValue(r),a=t.internal.getMaxValue(r),w=!1,f=0;if(n[f]==="-"){if(i!==10)throw new System.ArgumentException("String cannot contain a minus sign if the base is not 10.");if(l>=0)throw new System.OverflowException("The string was being parsed as an unsigned number and could not have a negative sign.");w=!0;++f}else n[f]==="+"&&++f;if(i===16&&n.length>=2&&n[f]==="0"&&n[f+1]==="x"&&(f+=2),i===2)o=t.internal.charsToCodes("01");else if(i===8)o=t.internal.charsToCodes("01234567");else if(i===10)o=t.internal.charsToCodes("0123456789");else if(i===16)o=t.internal.charsToCodes("0123456789abcdef");else throw new System.ArgumentException("Invalid Base.");for(v={},c=0;c=y&&s<=p))if(e===f)throw new System.FormatException("Could not find any recognizable digits.");else throw new System.FormatException("Additional non-parsable characters are at the end of the string.");if(d=r===h.Int64,u=d?new System.Int64(Bridge.$Long.fromString(n,!1,i)):new System.UInt64(Bridge.$Long.fromString(n,!0,i)),u.toString(i)!==n)throw new System.OverflowException("Value was either too large or too small.");return u}for(u=0,k=a-l+1,e=f;e=y&&s<=p){if(u*=i,u+=v[s],u>t.internal.typeRanges.Int64_MaxValue)throw new System.OverflowException("Value was either too large or too small.");}else if(e===f)throw new System.FormatException("Could not find any recognizable digits.");else throw new System.FormatException("Additional non-parsable characters are at the end of the string.");if(w&&(u*=-1),u>a&&i!==10&&l<0&&(u=u-k),ua)throw new System.OverflowException("Value was either too large or too small.");return u},toStringInBase:function(n,i,r){var w=t.convert.typeCodes,v,e,h,y,p,o,u,f,c;if(i!==2&&i!==8&&i!==10&&i!==16)throw new System.ArgumentException("Invalid Base.");var l=t.internal.getMinValue(r),a=t.internal.getMaxValue(r),s=System.Int64.is64Bit(n);if(s){if(n.lt(l)||n.gt(a))throw new System.OverflowException("Value was either too large or too small for an unsigned byte.");}else if(na)throw new System.OverflowException("Value was either too large or too small for an unsigned byte.");if(v=!1,s)return i===10?n.toString():n.value.toUnsigned().toString(i);if(n<0&&(i===10?(v=!0,n*=-1):n=a+1-l+n),i===2)e="01";else if(i===8)e="01234567";else if(i===10)e="0123456789";else if(i===16)e="0123456789abcdef";else throw new System.ArgumentException("Invalid Base.");for(h={},y=e.split(""),o=0;o0)f=n%i,n=(n-f)/i,c=h[f],u+=c;return v&&(u+="-"),u.split("").reverse().join("")},toBase64String:function(n,i,r,u){var f;if(n==null)throw new System.ArgumentNullException("inArray");if(i=i||0,r=r!=null?r:n.length,u=u||0,r<0)throw new System.ArgumentOutOfRangeException("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offset","Value must be positive.");if(u<0||u>1)throw new System.ArgumentException("Illegal enum value.");if(f=n.length,i>f-r)throw new System.ArgumentOutOfRangeException("offset","Offset and length must refer to a position in the string.");if(f===0)return"";var o=u===1,s=t.internal.toBase64_CalculateAndValidateOutputLength(r,o),e=[];return e.length=s,t.internal.convertToBase64Array(e,n,i,r,o),e.join("")},toBase64CharArray:function(n,i,r,u,f,e){var o,s,c;if(n==null)throw new System.ArgumentNullException("inArray");if(u==null)throw new System.ArgumentNullException("outArray");if(r<0)throw new System.ArgumentOutOfRangeException("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offsetIn","Value must be positive.");if(f<0)throw new System.ArgumentOutOfRangeException("offsetOut","Value must be positive.");if(e=e||0,e<0||e>1)throw new System.ArgumentException("Illegal enum value.");if(o=n.length,i>o-r)throw new System.ArgumentOutOfRangeException("offsetIn","Offset and length must refer to a position in the string.");if(o===0)return 0;var h=e===1,l=u.length,a=t.internal.toBase64_CalculateAndValidateOutputLength(r,h);if(f>l-a)throw new System.ArgumentOutOfRangeException("offsetOut","Either offset did not refer to a position in the string, or there is an insufficient length of destination character array.");return s=[],c=t.internal.convertToBase64Array(s,n,i,r,h),t.internal.charsToCodes(s,u,f),c},fromBase64String:function(n){if(n==null)throw new System.ArgumentNullException("s");var i=n.split("");return t.internal.fromBase64CharPtr(i,0,i.length)},fromBase64CharArray:function(n,i,r){if(n==null)throw new System.ArgumentNullException("inArray");if(r<0)throw new System.ArgumentOutOfRangeException("length","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offset","Value must be positive.");if(i>n.length-r)throw new System.ArgumentOutOfRangeException("offset","Offset and length must refer to a position in the string.");var u=t.internal.codesToChars(n);return t.internal.fromBase64CharPtr(u,i,r)},convertToType:function(){throw new System.NotSupportedException("IConvertible interface is not supported.");}};t.internal={base64Table:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/","="],typeRanges:{Char_MinValue:0,Char_MaxValue:65535,Byte_MinValue:0,Byte_MaxValue:255,SByte_MinValue:-128,SByte_MaxValue:127,Int16_MinValue:-32768,Int16_MaxValue:32767,UInt16_MinValue:0,UInt16_MaxValue:65535,Int32_MinValue:-2147483648,Int32_MaxValue:2147483647,UInt32_MinValue:0,UInt32_MaxValue:4294967295,Int64_MinValue:System.Int64.MinValue,Int64_MaxValue:System.Int64.MaxValue,UInt64_MinValue:System.UInt64.MinValue,UInt64_MaxValue:System.UInt64.MaxValue,Single_MinValue:-340282347e30,Single_MaxValue:340282347e30,Double_MinValue:-17976931348623157e292,Double_MaxValue:17976931348623157e292,Decimal_MinValue:System.Decimal.MinValue,Decimal_MaxValue:System.Decimal.MaxValue},base64LineBreakPosition:76,getTypeCodeName:function(n){var r=t.convert.typeCodes,u,i,e,f;if(t.internal.typeCodeNames==null){u={};for(i in r)r.hasOwnProperty(i)&&(e=r[i],u[e]=i);t.internal.typeCodeNames=u}if(f=t.internal.typeCodeNames[n],f==null)throw System.ArgumentOutOfRangeException("typeCode","The specified typeCode is undefined.");return f},suggestTypeCode:function(n){var i=t.convert.typeCodes,r=typeof n;switch(r){case"boolean":return i.Boolean;case"number":return n%1!=0?i.Double:i.Int32;case"string":return i.String;case"object":if(Bridge.isDate(n))return i.DateTime;if(n!=null)return i.Object}return null},getMinValue:function(n){var i=t.convert.typeCodes,r;switch(n){case i.Char:return t.internal.typeRanges.Char_MinValue;case i.SByte:return t.internal.typeRanges.SByte_MinValue;case i.Byte:return t.internal.typeRanges.Byte_MinValue;case i.Int16:return t.internal.typeRanges.Int16_MinValue;case i.UInt16:return t.internal.typeRanges.UInt16_MinValue;case i.Int32:return t.internal.typeRanges.Int32_MinValue;case i.UInt32:return t.internal.typeRanges.UInt32_MinValue;case i.Int64:return t.internal.typeRanges.Int64_MinValue;case i.UInt64:return t.internal.typeRanges.UInt64_MinValue;case i.Single:return t.internal.typeRanges.Single_MinValue;case i.Double:return t.internal.typeRanges.Double_MinValue;case i.Decimal:return t.internal.typeRanges.Decimal_MinValue;case i.DateTime:return r=new Date(0),r.setFullYear(1),r;default:return null}},getMaxValue:function(n){var i=t.convert.typeCodes;switch(n){case i.Char:return t.internal.typeRanges.Char_MaxValue;case i.SByte:return t.internal.typeRanges.SByte_MaxValue;case i.Byte:return t.internal.typeRanges.Byte_MaxValue;case i.Int16:return t.internal.typeRanges.Int16_MaxValue;case i.UInt16:return t.internal.typeRanges.UInt16_MaxValue;case i.Int32:return t.internal.typeRanges.Int32_MaxValue;case i.UInt32:return t.internal.typeRanges.UInt32_MaxValue;case i.Int64:return t.internal.typeRanges.Int64_MaxValue;case i.UInt64:return t.internal.typeRanges.UInt64_MaxValue;case i.Single:return t.internal.typeRanges.Single_MaxValue;case i.Double:return t.internal.typeRanges.Double_MaxValue;case i.Decimal:return t.internal.typeRanges.Decimal_MaxValue;default:throw new System.ArgumentOutOfRangeException("typeCode","The specified typeCode is undefined.");}},isFloatingType:function(n){var i=t.convert.typeCodes;return n===i.Single||n===i.Double||n===i.Decimal},toNumber:function(n,i,r,u){var f=t.convert.typeCodes,e=typeof n,o=t.internal.isFloatingType(r),h,c,s;u===f.String&&(e="string");(System.Int64.is64Bit(n)||n instanceof System.Decimal)&&(e="number");switch(e){case"boolean":return n?1:0;case"number":return r===f.Decimal?(t.internal.validateNumberRange(n,r,!0),new System.Decimal(n,i)):r===f.Int64?(t.internal.validateNumberRange(n,r,!0),new System.Int64(n)):r===f.UInt64?(t.internal.validateNumberRange(n,r,!0),new System.UInt64(n)):(System.Int64.is64Bit(n)?n=n.toNumber():n instanceof System.Decimal&&(n=n.toFloat()),o||n%1==0||(n=t.internal.roundToInt(n,r)),o&&(h=t.internal.getMinValue(r),c=t.internal.getMaxValue(r),n>c?n=Infinity:nn||o.toNumber()n||o.toNumber()o)&&this.throwOverflow(f))},throwOverflow:function(n){throw new System.OverflowException("Value was either too large or too small for '"+n+"'.");},roundToInt:function(n,i){var r,f;if(n%1==0)return n;r=n>=0?Math.floor(n):-1*Math.floor(-n);var u=n-r,e=t.internal.getMinValue(i),o=t.internal.getMaxValue(i);if(n>=0){if(n.5||u===.5&&(r&1)!=0)&&++r,r}else if(n>=e-.5)return(u<-.5||u===-.5&&(r&1)!=0)&&--r,r;f=t.internal.getTypeCodeName(i);throw new System.OverflowException("Value was either too large or too small for an '"+f+"'.");},toBase64_CalculateAndValidateOutputLength:function(n,i){var f=t.internal.base64LineBreakPosition,r=~~(n/3)*4,u;if(r+=n%3!=0?4:0,r===0)return 0;if(i&&(u=~~(r/f),r%f==0&&--u,r+=u*2),r>2147483647)throw new System.OutOfMemoryException;return r},convertToBase64Array:function(n,i,r,u,f){for(var s=t.internal.base64Table,a=t.internal.base64LineBreakPosition,c=u%3,l=r+(u-c),h=0,e=0,o=r;o>2],n[e+1]=s[(i[o]&3)<<4|(i[o+1]&240)>>4],n[e+2]=s[(i[o+1]&15)<<2|(i[o+2]&192)>>6],n[e+3]=s[i[o+2]&63],e+=4;o=l;f&&c!==0&&h===t.internal.base64LineBreakPosition&&(n[e++]="\r",n[e++]="\n");switch(c){case 2:n[e]=s[(i[o]&252)>>2];n[e+1]=s[(i[o]&3)<<4|(i[o+1]&240)>>4];n[e+2]=s[(i[o+1]&15)<<2];n[e+3]=s[64];e+=4;break;case 1:n[e]=s[(i[o]&252)>>2];n[e+1]=s[(i[o]&3)<<4];n[e+2]=s[64];n[e+3]=s[64];e+=4}return e},fromBase64CharPtr:function(n,i,r){var u,f,e;if(r<0)throw new System.ArgumentOutOfRangeException("inputLength","Index was out of range. Must be non-negative and less than the size of the collection.");if(i<0)throw new System.ArgumentOutOfRangeException("offset","Value must be positive.");while(r>0){if(u=n[i+r-1],u!==" "&&u!=="\n"&&u!=="\r"&&u!=="\t")break;r--}if(f=t.internal.fromBase64_ComputeResultLength(n,i,r),0>f)throw new System.InvalidOperationException("Contract voilation: 0 <= resultLength.");return e=[],e.length=f,t.internal.fromBase64_Decode(n,i,r,e,0,f),e},fromBase64_Decode:function(n,t,i,r,u,f){for(var k=u,a="A".charCodeAt(0),v="a".charCodeAt(0),y="0".charCodeAt(0),p="=".charCodeAt(0),d="+".charCodeAt(0),g="/".charCodeAt(0),nt=" ".charCodeAt(0),tt="\t".charCodeAt(0),it="\n".charCodeAt(0),rt="\r".charCodeAt(0),w="Z".charCodeAt(0)-"A".charCodeAt(0),ut="9".charCodeAt(0)-"0".charCodeAt(0),h=t+i,l=u+f,o,e=255,b=!1,c=!1,s;;){if(t>=h){b=!0;break}if(o=n[t].charCodeAt(0),t++,o-a>>>0<=w)o-=a;else if(o-v>>>0<=w)o-=v-26;else if(o-y>>>0<=ut)o-=y-52;else switch(o){case d:o=62;break;case g:o=63;break;case rt:case it:case nt:case tt:continue;case p:c=!0;break;default:throw new System.FormatException("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");}if(c)break;if(e=e<<6|o,(e&2147483648)!=0){if(l-u<3)return-1;r[u]=255&e>>16;r[u+1]=255&e>>8;r[u+2]=255&e;u+=3;e=255}}if(!b&&!c)throw new System.InvalidOperationException("Contract violation: should never get here.");if(c){if(o!==p)throw new System.InvalidOperationException("Contract violation: currCode == intEq.");if(t===h){if(e<<=6,(e&2147483648)==0)throw new System.FormatException("Invalid length for a Base-64 char array or string.");if(l-u<2)return-1;r[u]=255&e>>16;r[u+1]=255&e>>8;u+=2;e=255}else{while(t>16;u++;e=255}else throw new System.FormatException("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");}}if(e!==255)throw new System.FormatException("Invalid length for a Base-64 char array or string.");return u-k},fromBase64_ComputeResultLength:function(n,t,i){var f;if(i<0)throw new System.ArgumentOutOfRangeException("inputLength","Index was out of range. Must be non-negative and less than the size of the collection.");for(var e=t+i,u=i,r=0;tu)throw new System.InvalidOperationException("Contract violation: 0 <= usefulInputLength.");if(0>r)throw new System.InvalidOperationException("Contract violation: 0 <= padding.");if(r!==0)if(r===1)r=2;else if(r===2)r=1;else throw new System.FormatException("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.");return~~(u/4)*3+r},charsToCodes:function(n,t,i){if(n==null)return null;i=i||0;t==null&&(t=[],t.length=n.length);for(var r=0;r-1)throw new System.ArgumentException("Socket cannot have duplicate sub-protocols.","subProtocol");this.requestedSubProtocols.push(n)}});Bridge.define("System.Net.WebSockets.WebSocketReceiveResult",{ctor:function(n,t,i,r,u){this.$initialize();this.count=n;this.messageType=t;this.endOfMessage=i;this.closeStatus=r;this.closeStatusDescription=u},getCount:function(){return this.count},getMessageType:function(){return this.messageType},getEndOfMessage:function(){return this.endOfMessage},getCloseStatus:function(){return this.closeStatus},getCloseStatusDescription:function(){return this.closeStatusDescription}});Bridge.define("System.Uri",{ctor:function(n){this.$initialize();this.absoluteUri=n},getAbsoluteUri:function(){return this.absoluteUri}}),function(n,t){var f={Identity:function(n){return n},True:function(){return!0},Blank:function(){}},o={Boolean:"boolean",Number:"number",String:"string",Object:"object",Undefined:typeof t,Function:typeof function(){}},w={"":f.Identity},r={createLambda:function(n){var t,l,i,a,u,e,r,s,h,v,c;if(n==null)return f.Identity;if(typeof n===o.String){if(t=w[n],t!=null)return t;if(n.indexOf("=>")===-1){for(l=new RegExp("[$]+","g"),i=0;(a=l.exec(n))!=null;)u=a[0].length,u>i&&(i=u);for(e=[],r=1;r<=i;r++){for(s="",h=0;h(.*)/),t=new Function(c[1],"return "+c[2]),w[n]=t,t}return n},isIEnumerable:function(n){if(typeof Enumerator!==o.Undefined)try{return new Enumerator(n),!0}catch(t){}return!1},defineProperty:Object.defineProperties!=null?function(n,t,i){Object.defineProperty(n,t,{enumerable:!1,configurable:!0,writable:!0,value:i})}:function(n,t,i){n[t]=i},compare:function(n,t){return n===t?0:n>t?1:-1},dispose:function(n){n!=null&&n.dispose()}},l={Before:0,Running:1,After:2},u=function(n,t,i){var u=new b,r=l.Before;this.getCurrent=u.getCurrent;this.reset=function(){throw new Error("Reset is not supported");};this.moveNext=function(){try{switch(r){case l.Before:r=l.Running;n();case l.Running:return t.apply(u)?!0:(this.dispose(),!1);case l.After:return!1}}catch(i){this.dispose();throw i;}};this.dispose=function(){if(r==l.Running)try{i()}finally{r=l.After}};this.getCurrent$1=this.getCurrent;this.System$Collections$IEnumerator$getCurrent=this.getCurrent;this.System$Collections$IEnumerator$moveNext=this.moveNext;this.System$Collections$IEnumerator$reset=this.reset},b,i,k,s,a,y,e,h,c,p,v;u.$$inherits=[];Bridge.Class.addExtend(u,[System.IDisposable,System.Collections.IEnumerator]);b=function(){var n=null;this.getCurrent=function(){return n};this.yieldReturn=function(t){return n=t,!0};this.yieldBreak=function(){return!1}};i=function(n){this.getEnumerator=n};i.$$inherits=[];Bridge.Class.addExtend(i,[System.Collections.IEnumerable]);i.Utils={};i.Utils.createLambda=function(n){return r.createLambda(n)};i.Utils.createEnumerable=function(n){return new i(n)};i.Utils.createEnumerator=function(n,t,i){return new u(n,t,i)};i.Utils.extendTo=function(n){var u=n.prototype,o,t,f;n===Array?(o=e.prototype,r.defineProperty(u,"getSource",function(){return this})):(o=i.prototype,r.defineProperty(u,"getEnumerator",function(){return i.from(this).getEnumerator()}));for(t in o)(f=o[t],u[t]!=f)&&(u[t]==null||(t=t+"ByLinq",u[t]!=f))&&f instanceof Function&&r.defineProperty(u,t,f)};i.choice=function(){var n=arguments;return new i(function(){return new u(function(){n=n[0]instanceof Array?n[0]:n[0].getEnumerator!=null?n[0].toArray():n},function(){return this.yieldReturn(n[Math.floor(Math.random()*n.length)])},f.Blank)})};i.cycle=function(){var n=arguments;return new i(function(){var t=0;return new u(function(){n=n[0]instanceof Array?n[0]:n[0].getEnumerator!=null?n[0].toArray():n},function(){return t>=n.length&&(t=0),this.yieldReturn(n[t++])},f.Blank)})};k=new i(function(){return new u(f.Blank,function(){return!1},f.Blank)});i.empty=function(){return k};i.from=function(n){if(n==null)return i.empty();if(n instanceof i)return n;if(typeof n==o.Number||typeof n==o.Boolean)return i.repeat(n,1);if(typeof n==o.String)return new i(function(){var t=0;return new u(f.Blank,function(){return t=t?this.yieldReturn(n):this.yieldBreak()},f.Blank)})};i.repeat=function(n,t){return t!=null?i.repeat(n).take(t):new i(function(){return new u(f.Blank,function(){return this.yieldReturn(n)},f.Blank)})};i.repeatWithFinalize=function(n,t){return n=r.createLambda(n),t=r.createLambda(t),new i(function(){var i;return new u(function(){i=n()},function(){return this.yieldReturn(i)},function(){i!=null&&(t(i),i=null)})})};i.generate=function(n,t){return t!=null?i.generate(n).take(t):(n=r.createLambda(n),new i(function(){return new u(f.Blank,function(){return this.yieldReturn(n())},f.Blank)}))};i.toInfinity=function(n,t){return n==null&&(n=0),t==null&&(t=1),new i(function(){var i;return new u(function(){i=n-t},function(){return this.yieldReturn(i+=t)},f.Blank)})};i.toNegativeInfinity=function(n,t){return n==null&&(n=0),t==null&&(t=1),new i(function(){var i;return new u(function(){i=n+t},function(){return this.yieldReturn(i-=t)},f.Blank)})};i.unfold=function(n,t){return t=r.createLambda(t),new i(function(){var r=!0,i;return new u(f.Blank,function(){return r?(r=!1,i=n,this.yieldReturn(i)):(i=t(i),this.yieldReturn(i))},f.Blank)})};i.defer=function(n){return new i(function(){var t;return new u(function(){t=i.from(n()).getEnumerator()},function(){return t.moveNext()?this.yieldReturn(t.getCurrent()):this.yieldBreak()},function(){r.dispose(t)})})};i.prototype.traverseBreadthFirst=function(n,t){var f=this;return n=r.createLambda(n),t=r.createLambda(t),new i(function(){var e,s=0,o=[];return new u(function(){e=f.getEnumerator()},function(){for(;;){if(e.moveNext())return o.push(e.getCurrent()),this.yieldReturn(t(e.getCurrent(),s));var u=i.from(o).selectMany(function(t){return n(t)});if(u.any())s++,o=[],r.dispose(e),e=u.getEnumerator();else return!1}},function(){r.dispose(e)})})};i.prototype.traverseDepthFirst=function(n,t){var f=this;return n=r.createLambda(n),t=r.createLambda(t),new i(function(){var o=[],e;return new u(function(){e=f.getEnumerator()},function(){for(;;){if(e.moveNext()){var u=t(e.getCurrent(),o.length);return o.push(e),e=i.from(n(e.getCurrent())).getEnumerator(),this.yieldReturn(u)}if(o.length<=0)return!1;r.dispose(e);e=o.pop()}},function(){try{r.dispose(e)}finally{i.from(o).forEach(function(n){n.dispose()})}})})};i.prototype.flatten=function(){var n=this;return new i(function(){var e,t=null;return new u(function(){e=n.getEnumerator()},function(){for(;;){if(t!=null){if(t.moveNext())return this.yieldReturn(t.getCurrent());t=null}if(e.moveNext())if(e.getCurrent()instanceof Array){r.dispose(t);t=i.from(e.getCurrent()).selectMany(f.Identity).flatten().getEnumerator();continue}else return this.yieldReturn(e.getCurrent());return!1}},function(){try{r.dispose(e)}finally{r.dispose(t)}})})};i.prototype.pairwise=function(n){var t=this;return n=r.createLambda(n),new i(function(){var i;return new u(function(){i=t.getEnumerator();i.moveNext()},function(){var t=i.getCurrent();return i.moveNext()?this.yieldReturn(n(t,i.getCurrent())):!1},function(){r.dispose(i)})})};i.prototype.scan=function(n,t){var f,e;return t==null?(t=r.createLambda(n),f=!1):(t=r.createLambda(t),f=!0),e=this,new i(function(){var i,o,s=!0;return new u(function(){i=e.getEnumerator()},function(){if(s){if(s=!1,f)return this.yieldReturn(o=n);if(i.moveNext())return this.yieldReturn(o=i.getCurrent())}return i.moveNext()?this.yieldReturn(o=t(o,i.getCurrent())):!1},function(){r.dispose(i)})})};i.prototype.select=function(n){if(n=r.createLambda(n),n.length<=1)return new c(this,null,n);var t=this;return new i(function(){var i,f=0;return new u(function(){i=t.getEnumerator()},function(){return i.moveNext()?this.yieldReturn(n(i.getCurrent(),f++)):!1},function(){r.dispose(i)})})};i.prototype.selectMany=function(n,f){var e=this;return n=r.createLambda(n),f==null&&(f=function(n,t){return t}),f=r.createLambda(f),new i(function(){var s,o=t,h=0;return new u(function(){s=e.getEnumerator()},function(){if(o===t&&!s.moveNext())return!1;do{if(o==null){var u=n(s.getCurrent(),h++);o=i.from(u).getEnumerator()}if(o.moveNext())return this.yieldReturn(f(s.getCurrent(),o.getCurrent()));r.dispose(o);o=null}while(s.moveNext());return!1},function(){try{r.dispose(s)}finally{r.dispose(o)}})})};i.prototype.where=function(n){if(n=r.createLambda(n),n.length<=1)return new h(this,n);var t=this;return new i(function(){var i,f=0;return new u(function(){i=t.getEnumerator()},function(){while(i.moveNext())if(n(i.getCurrent(),f++))return this.yieldReturn(i.getCurrent());return!1},function(){r.dispose(i)})})};i.prototype.choose=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i,f=0;return new u(function(){i=t.getEnumerator()},function(){while(i.moveNext()){var t=n(i.getCurrent(),f++);if(t!=null)return this.yieldReturn(t)}return this.yieldBreak()},function(){r.dispose(i)})})};i.prototype.ofType=function(n){var t=this;return new i(function(){var i;return new u(function(){i=Bridge.getEnumerator(t)},function(){while(i.moveNext()){var t=Bridge.as(i.getCurrent(),n);if(Bridge.hasValue(t))return this.yieldReturn(t)}return!1},function(){r.dispose(i)})})};i.prototype.zip=function(){var e=arguments,n=r.createLambda(arguments[arguments.length-1]),t=this,f;return arguments.length==2?(f=arguments[0],new i(function(){var e,o,s=0;return new u(function(){e=t.getEnumerator();o=i.from(f).getEnumerator()},function(){return e.moveNext()&&o.moveNext()?this.yieldReturn(n(e.getCurrent(),o.getCurrent(),s++)):!1},function(){try{r.dispose(e)}finally{r.dispose(o)}})})):new i(function(){var f,o=0;return new u(function(){var n=i.make(t).concat(i.from(e).takeExceptLast().select(i.from)).select(function(n){return n.getEnumerator()}).toArray();f=i.from(n)},function(){if(f.all(function(n){return n.moveNext()})){var t=f.select(function(n){return n.getCurrent()}).toArray();return t.push(o++),this.yieldReturn(n.apply(null,t))}return this.yieldBreak()},function(){i.from(f).forEach(r.dispose)})})};i.prototype.merge=function(){var n=arguments,t=this;return new i(function(){var f,e=-1;return new u(function(){f=i.make(t).concat(i.from(n).select(i.from)).select(function(n){return n.getEnumerator()}).toArray()},function(){while(f.length>0){e=e>=f.length-1?0:e+1;var n=f[e];if(n.moveNext())return this.yieldReturn(n.getCurrent());n.dispose();f.splice(e--,1)}return this.yieldBreak()},function(){i.from(f).forEach(r.dispose)})})};i.prototype.join=function(n,e,o,s,h){e=r.createLambda(e);o=r.createLambda(o);s=r.createLambda(s);var c=this;return new i(function(){var l,v,a=null,y=0;return new u(function(){l=c.getEnumerator();v=i.from(n).toLookup(o,f.Identity,h)},function(){for(var n,i;;){if(a!=null){if(n=a[y++],n!==t)return this.yieldReturn(s(l.getCurrent(),n));n=null;y=0}if(l.moveNext())i=e(l.getCurrent()),a=v.get(i).toArray();else return!1}},function(){r.dispose(l)})})};i.prototype.groupJoin=function(n,t,e,o,s){t=r.createLambda(t);e=r.createLambda(e);o=r.createLambda(o);var h=this;return new i(function(){var c=h.getEnumerator(),l=null;return new u(function(){c=h.getEnumerator();l=i.from(n).toLookup(e,f.Identity,s)},function(){if(c.moveNext()){var n=l.get(t(c.getCurrent()));return this.yieldReturn(o(c.getCurrent(),n))}return!1},function(){r.dispose(c)})})};i.prototype.all=function(n){n=r.createLambda(n);var t=!0;return this.forEach(function(i){if(!n(i))return t=!1,!1}),t};i.prototype.any=function(n){n=r.createLambda(n);var t=this.getEnumerator();try{if(arguments.length==0)return t.moveNext();while(t.moveNext())if(n(t.getCurrent()))return!0;return!1}finally{r.dispose(t)}};i.prototype.isEmpty=function(){return!this.any()};i.prototype.concat=function(){var n=this,t,f;return arguments.length==1?(t=arguments[0],new i(function(){var e,f;return new u(function(){e=n.getEnumerator()},function(){if(f==null){if(e.moveNext())return this.yieldReturn(e.getCurrent());f=i.from(t).getEnumerator()}return f.moveNext()?this.yieldReturn(f.getCurrent()):!1},function(){try{r.dispose(e)}finally{r.dispose(f)}})})):(f=arguments,new i(function(){var t;return new u(function(){t=i.make(n).concat(i.from(f).select(i.from)).select(function(n){return n.getEnumerator()}).toArray()},function(){while(t.length>0){var n=t[0];if(n.moveNext())return this.yieldReturn(n.getCurrent());n.dispose();t.splice(0,1)}return this.yieldBreak()},function(){i.from(t).forEach(r.dispose)})}))};i.prototype.insert=function(n,t){var f=this;return new i(function(){var o,e,s=0,h=!1;return new u(function(){o=f.getEnumerator();e=i.from(t).getEnumerator()},function(){return s==n&&e.moveNext()?(h=!0,this.yieldReturn(e.getCurrent())):o.moveNext()?(s++,this.yieldReturn(o.getCurrent())):!h&&e.moveNext()?this.yieldReturn(e.getCurrent()):!1},function(){try{r.dispose(o)}finally{r.dispose(e)}})})};i.prototype.alternate=function(n){var t=this;return new i(function(){var f,e,s,o;return new u(function(){s=n instanceof Array||n.getEnumerator!=null?i.from(i.from(n).toArray()):i.make(n);e=t.getEnumerator();e.moveNext()&&(f=e.getCurrent())},function(){for(;;){if(o!=null){if(o.moveNext())return this.yieldReturn(o.getCurrent());o=null}if(f==null&&e.moveNext()){f=e.getCurrent();o=s.getEnumerator();continue}else if(f!=null){var n=f;return f=null,this.yieldReturn(n)}return this.yieldBreak()}},function(){try{r.dispose(e)}finally{r.dispose(o)}})})};i.prototype.contains=function(n,t){t=t||System.Collections.Generic.EqualityComparer$1.$default;var i=this.getEnumerator();try{while(i.moveNext())if(t.equals2(i.getCurrent(),n))return!0;return!1}finally{r.dispose(i)}};i.prototype.defaultIfEmpty=function(n){var f=this;return n===t&&(n=null),new i(function(){var t,i=!0;return new u(function(){t=f.getEnumerator()},function(){return t.moveNext()?(i=!1,this.yieldReturn(t.getCurrent())):i?(i=!1,this.yieldReturn(n)):!1},function(){r.dispose(t)})})};i.prototype.distinct=function(n){return this.except(i.empty(),n)};i.prototype.distinctUntilChanged=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i,f,e;return new u(function(){i=t.getEnumerator()},function(){while(i.moveNext()){var t=n(i.getCurrent());if(e)return e=!1,f=t,this.yieldReturn(i.getCurrent());if(f!==t)return f=t,this.yieldReturn(i.getCurrent())}return this.yieldBreak()},function(){r.dispose(i)})})};i.prototype.except=function(n,t){var f=this;return new i(function(){var o,e;return new u(function(){o=f.getEnumerator();e=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,t);i.from(n).forEach(function(n){e.containsKey(n)||e.add(n)})},function(){while(o.moveNext()){var n=o.getCurrent();if(!e.containsKey(n))return e.add(n),this.yieldReturn(n)}return!1},function(){r.dispose(o)})})};i.prototype.intersect=function(n,t){var f=this;return new i(function(){var e,o,s;return new u(function(){e=f.getEnumerator();o=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,t);i.from(n).forEach(function(n){o.containsKey(n)||o.add(n)});s=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,t)},function(){while(e.moveNext()){var n=e.getCurrent();if(!s.containsKey(n)&&o.containsKey(n))return s.add(n),this.yieldReturn(n)}return!1},function(){r.dispose(e)})})};i.prototype.sequenceEqual=function(n,t){var f,u;t=t||System.Collections.Generic.EqualityComparer$1.$default;f=this.getEnumerator();try{u=i.from(n).getEnumerator();try{while(f.moveNext())if(!u.moveNext()||!t.equals2(f.getCurrent(),u.getCurrent()))return!1;return u.moveNext()?!1:!0}finally{r.dispose(u)}}finally{r.dispose(f)}};i.prototype.union=function(n,f){var e=this;return new i(function(){var h,o,s;return new u(function(){h=e.getEnumerator();s=new(System.Collections.Generic.Dictionary$2(Object,Object))(null,f)},function(){var r;if(o===t){while(h.moveNext())if(r=h.getCurrent(),!s.containsKey(r))return s.add(r),this.yieldReturn(r);o=i.from(n).getEnumerator()}while(o.moveNext())if(r=o.getCurrent(),!s.containsKey(r))return s.add(r),this.yieldReturn(r);return!1},function(){try{r.dispose(h)}finally{r.dispose(o)}})})};i.prototype.orderBy=function(n,t){return new s(this,n,t,!1)};i.prototype.orderByDescending=function(n,t){return new s(this,n,t,!0)};i.prototype.reverse=function(){var n=this;return new i(function(){var t,i;return new u(function(){t=n.toArray();i=t.length},function(){return i>0?this.yieldReturn(t[--i]):!1},f.Blank)})};i.prototype.shuffle=function(){var n=this;return new i(function(){var t;return new u(function(){t=n.toArray()},function(){if(t.length>0){var n=Math.floor(Math.random()*t.length);return this.yieldReturn(t.splice(n,1)[0])}return!1},f.Blank)})};i.prototype.weightedSample=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i,r=0;return new u(function(){i=t.choose(function(t){var i=n(t);return i<=0?null:(r+=i,{value:t,bound:r})}).toArray()},function(){var t;if(i.length>0){for(var f=Math.floor(Math.random()*r)+1,u=-1,n=i.length;n-u>1;)t=Math.floor((u+n)/2),i[t].bound>=f?n=t:u=t;return this.yieldReturn(i[n].value)}return this.yieldBreak()},f.Blank)})};i.prototype.groupBy=function(n,t,f,e){var o=this;return n=r.createLambda(n),t=r.createLambda(t),f!=null&&(f=r.createLambda(f)),new i(function(){var i;return new u(function(){i=o.toLookup(n,t,e).toEnumerable().getEnumerator()},function(){while(i.moveNext())return f==null?this.yieldReturn(i.getCurrent()):this.yieldReturn(f(i.getCurrent().key(),i.getCurrent()));return!1},function(){r.dispose(i)})})};i.prototype.partitionBy=function(n,t,f,e){var s=this,o;return n=r.createLambda(n),t=r.createLambda(t),e=e||System.Collections.Generic.EqualityComparer$1.$default,f==null?(o=!1,f=function(n,t){return new v(n,t)}):(o=!0,f=r.createLambda(f)),new i(function(){var h,l,c=[];return new u(function(){h=s.getEnumerator();h.moveNext()&&(l=n(h.getCurrent()),c.push(t(h.getCurrent())))},function(){for(var r,u;(r=h.moveNext())==!0;)if(e.equals2(l,n(h.getCurrent())))c.push(t(h.getCurrent()));else break;return c.length>0?(u=o?f(l,i.from(c)):f(l,c),r?(l=n(h.getCurrent()),c=[t(h.getCurrent())]):c=[],this.yieldReturn(u)):!1},function(){r.dispose(h)})})};i.prototype.buffer=function(n){var t=this;return new i(function(){var i;return new u(function(){i=t.getEnumerator()},function(){for(var t=[],r=0;i.moveNext();)if(t.push(i.getCurrent()),++r>=n)return this.yieldReturn(t);return t.length>0?this.yieldReturn(t):!1},function(){r.dispose(i)})})};i.prototype.aggregate=function(n,t,i){return i=r.createLambda(i),i(this.scan(n,t,i).last())};i.prototype.average=function(n,t){!n||t||Bridge.isFunction(n)||(t=n,n=null);n=r.createLambda(n);var i=t||0,u=0;if(this.forEach(function(t){t=n(t);t instanceof System.Decimal||System.Int64.is64Bit(t)?i=t.add(i):i instanceof System.Decimal||System.Int64.is64Bit(i)?i=i.add(t):i+=t;++u}),u===0)throw new System.InvalidOperationException("Sequence contains no elements");return i instanceof System.Decimal||System.Int64.is64Bit(i)?i.div(u):i/u};i.prototype.nullableAverage=function(n,t){return this.any(Bridge.isNull)?null:this.average(n,t)};i.prototype.count=function(n){n=n==null?f.True:r.createLambda(n);var t=0;return this.forEach(function(i,r){n(i,r)&&++t}),t};i.prototype.max=function(n){return n==null&&(n=f.Identity),this.select(n).aggregate(function(n,t){return Bridge.compare(n,t,!0)===1?n:t})};i.prototype.nullableMax=function(n){return this.any(Bridge.isNull)?null:this.max(n)};i.prototype.min=function(n){return n==null&&(n=f.Identity),this.select(n).aggregate(function(n,t){return Bridge.compare(n,t,!0)===-1?n:t})};i.prototype.nullableMin=function(n){return this.any(Bridge.isNull)?null:this.min(n)};i.prototype.maxBy=function(n){return n=r.createLambda(n),this.aggregate(function(t,i){return Bridge.compare(n(t),n(i),!0)===1?t:i})};i.prototype.minBy=function(n){return n=r.createLambda(n),this.aggregate(function(t,i){return Bridge.compare(n(t),n(i),!0)===-1?t:i})};i.prototype.sum=function(n,t){!n||t||Bridge.isFunction(n)||(t=n,n=null);n==null&&(n=f.Identity);var i=this.select(n).aggregate(0,function(n,t){return n instanceof System.Decimal||System.Int64.is64Bit(n)?n.add(t):t instanceof System.Decimal||System.Int64.is64Bit(t)?t.add(n):n+t});return i===0&&t?t:i};i.prototype.nullableSum=function(n,t){return this.any(Bridge.isNull)?null:this.sum(n,t)};i.prototype.elementAt=function(n){var t,i=!1;if(this.forEach(function(r,u){if(u==n)return t=r,i=!0,!1}),!i)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return t};i.prototype.elementAtOrDefault=function(n,i){i===t&&(i=null);var r,u=!1;return this.forEach(function(t,i){if(i==n)return r=t,u=!0,!1}),u?r:i};i.prototype.first=function(n){if(n!=null)return this.where(n).first();var t,i=!1;if(this.forEach(function(n){return t=n,i=!0,!1}),!i)throw new Error("first:No element satisfies the condition.");return t};i.prototype.firstOrDefault=function(n,i){if(i===t&&(i=null),n!=null)return this.where(n).firstOrDefault(null,i);var r,u=!1;return this.forEach(function(n){return r=n,u=!0,!1}),u?r:i};i.prototype.last=function(n){if(n!=null)return this.where(n).last();var t,i=!1;if(this.forEach(function(n){i=!0;t=n}),!i)throw new Error("last:No element satisfies the condition.");return t};i.prototype.lastOrDefault=function(n,i){if(i===t&&(i=null),n!=null)return this.where(n).lastOrDefault(null,i);var r,u=!1;return this.forEach(function(n){u=!0;r=n}),u?r:i};i.prototype.single=function(n){if(n!=null)return this.where(n).single();var i,t=!1;if(this.forEach(function(n){if(t)throw new Error("single:sequence contains more than one element.");else t=!0,i=n}),!t)throw new Error("single:No element satisfies the condition.");return i};i.prototype.singleOrDefault=function(n,i){if(i===t&&(i=null),n!=null)return this.where(n).singleOrDefault(null,i);var u,r=!1;return this.forEach(function(n){if(r)throw new Error("single:sequence contains more than one element.");else r=!0,u=n}),r?u:i};i.prototype.skip=function(n){var t=this;return new i(function(){var i,f=0;return new u(function(){for(i=t.getEnumerator();f++")})};i.prototype.force=function(){var n=this.getEnumerator();try{while(n.moveNext());}finally{r.dispose(n)}};i.prototype.letBind=function(n){n=r.createLambda(n);var t=this;return new i(function(){var f;return new u(function(){f=i.from(n(t)).getEnumerator()},function(){return f.moveNext()?this.yieldReturn(f.getCurrent()):!1},function(){r.dispose(f)})})};i.prototype.share=function(){var i=this,n,t=!1;return new y(function(){return new u(function(){n==null&&(n=i.getEnumerator())},function(){if(t)throw new Error("enumerator is disposed");return n.moveNext()?this.yieldReturn(n.getCurrent()):!1},f.Blank)},function(){t=!0;r.dispose(n)})};i.prototype.memoize=function(){var e=this,n,t,i=!1;return new y(function(){var r=-1;return new u(function(){t==null&&(t=e.getEnumerator(),n=[])},function(){if(i)throw new Error("enumerator is disposed");return(r++,n.length<=r)?t.moveNext()?this.yieldReturn(n[r]=t.getCurrent()):!1:this.yieldReturn(n[r])},f.Blank)},function(){i=!0;r.dispose(t);n=null})};i.prototype.catchError=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i;return new u(function(){i=t.getEnumerator()},function(){try{return i.moveNext()?this.yieldReturn(i.getCurrent()):!1}catch(t){return n(t),!1}},function(){r.dispose(i)})})};i.prototype.finallyAction=function(n){n=r.createLambda(n);var t=this;return new i(function(){var i;return new u(function(){i=t.getEnumerator()},function(){return i.moveNext()?this.yieldReturn(i.getCurrent()):!1},function(){try{r.dispose(i)}finally{n()}})})};i.prototype.log=function(n){return n=r.createLambda(n),this.doAction(function(t){typeof console!==o.Undefined&&console.log(n(t))})};i.prototype.trace=function(n,t){return n==null&&(n="Trace"),t=r.createLambda(t),this.doAction(function(i){typeof console!==o.Undefined&&console.log(n,t(i))})};s=function(n,t,i,u,f){this.source=n;this.keySelector=r.createLambda(t);this.comparer=i||System.Collections.Generic.Comparer$1.$default;this.descending=u;this.parent=f};s.prototype=new i;s.prototype.createOrderedEnumerable=function(n,t,i){return new s(this.source,n,t,i,this)};s.prototype.thenBy=function(n,t){return this.createOrderedEnumerable(n,t,!1)};s.prototype.thenByDescending=function(n,t){return this.createOrderedEnumerable(n,t,!0)};s.prototype.getEnumerator=function(){var i=this,t,n,r=0;return new u(function(){t=[];n=[];i.source.forEach(function(i,r){t.push(i);n.push(r)});var r=a.create(i,null);r.GenerateKeys(t);n.sort(function(n,t){return r.compare(n,t)})},function(){return r0:i.prototype.any.apply(this,arguments)};e.prototype.count=function(n){return n==null?this.getSource().length:i.prototype.count.apply(this,arguments)};e.prototype.elementAt=function(n){var t=this.getSource();return 0<=n&&n0?t[0]:i.prototype.first.apply(this,arguments)};e.prototype.firstOrDefault=function(n,r){if(r===t&&(r=null),n!=null)return i.prototype.firstOrDefault.apply(this,arguments);var u=this.getSource();return u.length>0?u[0]:r};e.prototype.last=function(n){var t=this.getSource();return n==null&&t.length>0?t[t.length-1]:i.prototype.last.apply(this,arguments)};e.prototype.lastOrDefault=function(n,r){if(r===t&&(r=null),n!=null)return i.prototype.lastOrDefault.apply(this,arguments);var u=this.getSource();return u.length>0?u[u.length-1]:r};e.prototype.skip=function(n){var t=this.getSource();return new i(function(){var i;return new u(function(){i=n<0?0:n},function(){return i0?this.yieldReturn(n[--t]):!1},f.Blank)})};e.prototype.sequenceEqual=function(n,t){return(n instanceof e||n instanceof Array)&&t==null&&i.from(n).count()!=this.count()?!1:i.prototype.sequenceEqual.apply(this,arguments)};e.prototype.toJoinedString=function(n,t){var r=this.getSource();return t!=null||!(r instanceof Array)?i.prototype.toJoinedString.apply(this,arguments):(n==null&&(n=""),r.join(n))};e.prototype.getEnumerator=function(){return new Bridge.ArrayEnumerator(this.getSource())};h=function(n,t){this.prevSource=n;this.prevPredicate=t};h.prototype=new i;h.prototype.where=function(n){if(n=r.createLambda(n),n.length<=1){var t=this.prevPredicate,u=function(i){return t(i)&&n(i)};return new h(this.prevSource,u)}return i.prototype.where.call(this,n)};h.prototype.select=function(n){return n=r.createLambda(n),n.length<=1?new c(this.prevSource,this.prevPredicate,n):i.prototype.select.call(this,n)};h.prototype.getEnumerator=function(){var t=this.prevPredicate,i=this.prevSource,n;return new u(function(){n=i.getEnumerator()},function(){while(n.moveNext())if(t(n.getCurrent()))return this.yieldReturn(n.getCurrent());return!1},function(){r.dispose(n)})};c=function(n,t,i){this.prevSource=n;this.prevPredicate=t;this.prevSelector=i};c.prototype=new i;c.prototype.where=function(n){return n=r.createLambda(n),n.length<=1?new h(this,n):i.prototype.where.call(this,n)};c.prototype.select=function(n){if(n=r.createLambda(n),n.length<=1){var t=this.prevSelector,u=function(i){return n(t(i))};return new c(this.prevSource,this.prevPredicate,u)}return i.prototype.select.call(this,n)};c.prototype.getEnumerator=function(){var t=this.prevPredicate,i=this.prevSelector,f=this.prevSource,n;return new u(function(){n=f.getEnumerator()},function(){while(n.moveNext())if(t==null||t(n.getCurrent()))return this.yieldReturn(i(n.getCurrent()));return!1},function(){r.dispose(n)})};p=function(n,t){this.count=function(){return n.getCount()};this.get=function(t){var r={v:null},u=n.tryGetValue(t,r);return i.from(u?r.v:[])};this.contains=function(t){return n.containsKey(t)};this.toEnumerable=function(){return i.from(t).select(function(t){return new v(t,n.get(t))})};this.getEnumerator=function(){return this.toEnumerable().getEnumerator()}};p.$$inherits=[];Bridge.Class.addExtend(p,[System.Collections.IEnumerable]);v=function(n,t){this.key=function(){return n};e.call(this,t)};v.prototype=new e;v.$$inherits=[];Bridge.Class.addExtend(v,[System.Collections.IEnumerable]);Bridge.Linq={};Bridge.Linq.Enumerable=i;System.Linq={};System.Linq.Enumerable=i}(Bridge.global);Bridge.define("System.Guid",{inherits:function(){return[System.IEquatable$1(System.Guid),System.IComparable$1(System.Guid),System.IFormattable]},$kind:"struct",statics:{error1:"Byte array for GUID must be exactly {0} bytes long",valid:null,split:null,nonFormat:null,replace:null,rnd:null,config:{init:function(){this.valid=new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","i");this.split=new RegExp("^(.{8})(.{4})(.{4})(.{4})(.{12})$");this.nonFormat=new RegExp("^[{(]?([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})[)}]?$","i");this.replace=new RegExp("-","g");this.rnd=new System.Random.ctor;this.empty=new System.Guid.ctor}},parse:function(n){return System.Guid.parseExact(n,null)},parseExact:function(n,t){var i=new System.Guid.ctor;return i.parseInternal(n,t,!0),i},tryParse:function(n,t){return System.Guid.tryParseExact(n,null,t)},tryParseExact:function(n,t,i){return i.v=new System.Guid.ctor,i.v.parseInternal(n,t,!1)},newGuid:function(){var n=System.Array.init(16,0,System.Byte);return System.Guid.rnd.nextBytes(n),n[7]=(n[7]&15|64)&255,n[8]=(n[8]&191|128)&255,new System.Guid.$ctor1(n)},makeBinary:function(n){return System.Int32.format(n&255,"x2")},op_Equality:function(n,t){return Bridge.referenceEquals(n,null)?Bridge.referenceEquals(t,null):n.equalsT(t)},op_Inequality:function(n,t){return!System.Guid.op_Equality(n,t)},getDefaultValue:function(){return new System.Guid}},_a:0,_b:0,_c:0,_d:0,_e:0,_f:0,_g:0,_h:0,_i:0,_j:0,_k:0,config:{alias:["equalsT","System$IEquatable$1$System$Guid$equalsT","compareTo","System$IComparable$1$System$Guid$compareTo","format","System$IFormattable$format"]},$ctor4:function(n){this.$initialize();(new System.Guid.ctor).$clone(this);this.parseInternal(n,null,!0)},$ctor1:function(n){if(this.$initialize(),n==null)throw new System.ArgumentNullException("b");if(n.length!==16)throw new System.ArgumentException(System.String.format(System.Guid.error1,16));this._a=n[3]<<24|n[2]<<16|n[1]<<8|n[0];this._b=Bridge.Int.sxs((n[5]<<8|n[4])&65535);this._c=Bridge.Int.sxs((n[7]<<8|n[6])&65535);this._d=n[8];this._e=n[9];this._f=n[10];this._g=n[11];this._h=n[12];this._i=n[13];this._j=n[14];this._k=n[15]},$ctor5:function(n,t,i,r,u,f,e,o,s,h,c){this.$initialize();this._a=n|0;this._b=Bridge.Int.sxs(t&65535);this._c=Bridge.Int.sxs(i&65535);this._d=r;this._e=u;this._f=f;this._g=e;this._h=o;this._i=s;this._j=h;this._k=c},$ctor3:function(n,t,i,r){if(this.$initialize(),r==null)throw new System.ArgumentNullException("d");if(r.length!==8)throw new System.ArgumentException(System.String.format(System.Guid.error1,8));this._a=n;this._b=t;this._c=i;this._d=r[0];this._e=r[1];this._f=r[2];this._g=r[3];this._h=r[4];this._i=r[5];this._j=r[6];this._k=r[7]},$ctor2:function(n,t,i,r,u,f,e,o,s,h,c){this.$initialize();this._a=n;this._b=t;this._c=i;this._d=r;this._e=u;this._f=f;this._g=e;this._h=o;this._i=s;this._j=h;this._k=c},ctor:function(){this.$initialize()},equalsT:function(n){return this._a!==n._a||this._b!==n._b||this._c!==n._c||this._d!==n._d||this._e!==n._e||this._f!==n._f||this._g!==n._g||this._h!==n._h||this._i!==n._i||this._j!==n._j||this._k!==n._k?!1:!0},compareTo:function(n){return System.String.compare(this.toString(),n.toString())},toString:function(){return this.format$1(null)},toString$1:function(n){return this.format$1(n)},format:function(n){return this.format$1(n)},toByteArray:function(){var n=System.Array.init(16,0,System.Byte);return n[0]=this._a&255,n[1]=this._a>>8&255,n[2]=this._a>>16&255,n[3]=this._a>>24&255,n[4]=this._b&255,n[5]=this._b>>8&255,n[6]=this._c&255,n[7]=this._c>>8&255,n[8]=this._d,n[9]=this._e,n[10]=this._f,n[11]=this._g,n[12]=this._h,n[13]=this._i,n[14]=this._j,n[15]=this._k,n},parseInternal:function(n,t,i){var u=null,f,r,e,o;if(System.String.isNullOrEmpty(n))throw new System.ArgumentNullException("input");if(System.String.isNullOrEmpty(t)?(f=System.Guid.nonFormat.exec(n),f!=null&&(u=f.slice(1).join("-").toLowerCase())):(t=t.toUpperCase(),r=!1,Bridge.referenceEquals(t,"N")?(e=System.Guid.split.exec(n),e!=null&&(r=!0,n=e.slice(1).join("-"))):Bridge.referenceEquals(t,"B")||Bridge.referenceEquals(t,"P")?(o=Bridge.referenceEquals(t,"B")?System.Array.init([123,125],System.Char):System.Array.init([40,41],System.Char),n.charCodeAt(0)===o[0]&&n.charCodeAt(n.length-1|0)===o[1]&&(r=!0,n=n.substr(1,n.length-2|0))):r=!0,r&&n.match(System.Guid.valid)!=null&&(u=n.toLowerCase())),u!=null)return this.fromString(u),!0;if(i)throw new System.FormatException("input is not in a recognized format");return!1},format$1:function(n){var t=System.String.concat(System.UInt32.format(this._a>>>0,"x8"),System.UInt16.format(this._b&65535,"x4"),System.UInt16.format(this._c&65535,"x4"));t=System.String.concat(t,System.Array.init([this._d,this._e,this._f,this._g,this._h,this._i,this._j,this._k],System.Byte).map(System.Guid.makeBinary).join(""));t=System.Guid.split.exec(t).slice(1).join("-");switch(n){case"n":case"N":return t.replace(System.Guid.replace,"");case"b":case"B":return System.String.concat(String.fromCharCode(123),t,String.fromCharCode(125));case"p":case"P":return System.String.concat(String.fromCharCode(40),t,String.fromCharCode(41));default:return t}},fromString:function(n){var t,i;if(!System.String.isNullOrEmpty(n)){for(n=n.replace(System.Guid.replace,""),t=System.Array.init(8,0,System.Byte),this._a=System.UInt32.parse(n.substr(0,8),16)|0,this._b=Bridge.Int.sxs(System.UInt16.parse(n.substr(8,4),16)&65535),this._c=Bridge.Int.sxs(System.UInt16.parse(n.substr(12,4),16)&65535),i=8;i<16;i=i+1|0)t[i-8|0]=System.Byte.parse(n.substr(i*2|0,2),16);this._d=t[0];this._e=t[1];this._f=t[2];this._g=t[3];this._h=t[4];this._i=t[5];this._j=t[6];this._k=t[7]}},getHashCode:function(){return Bridge.addHash([1684632903,this._a,this._b,this._c,this._d,this._e,this._f,this._g,this._h,this._i,this._j,this._k])},$clone:function(){return this}});Bridge.define("System.Text.RegularExpressions.Regex",{statics:{_cacheSize:15,_defaultMatchTimeout:System.TimeSpan.fromMilliseconds(-1),getCacheSize:function(){return System.Text.RegularExpressions.Regex._cacheSize},setCacheSize:function(n){if(n<0)throw new System.ArgumentOutOfRangeException("value");System.Text.RegularExpressions.Regex._cacheSize=n},escape:function(n){if(n==null)throw new System.ArgumentNullException("str");return System.Text.RegularExpressions.RegexParser.escape(n)},unescape:function(n){if(n==null)throw new System.ArgumentNullException("str");return System.Text.RegularExpressions.RegexParser.unescape(n)},isMatch:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.isMatch$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},isMatch$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.isMatch$2(n,t,i,r.Regex._defaultMatchTimeout)},isMatch$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.isMatch(n)},match:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.match$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},match$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.match$2(n,t,i,r.Regex._defaultMatchTimeout)},match$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.match(n)},matches:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.matches$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},matches$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.matches$2(n,t,i,r.Regex._defaultMatchTimeout)},matches$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.matches(n)},replace:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.replace$2(n,t,i,r.RegexOptions.None,r.Regex._defaultMatchTimeout)},replace$1:function(n,t,i,r){var u=System.Text.RegularExpressions;return u.Regex.replace$2(n,t,i,r,u.Regex._defaultMatchTimeout)},replace$2:function(n,t,i,r,u){var f=new System.Text.RegularExpressions.Regex.$ctor3(t,r,u,!0);return f.replace(n,i)},replace$3:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.replace$5(n,t,i,r.RegexOptions.None,r.Regex._defaultMatchTimeout)},replace$4:function(n,t,i,r){var u=System.Text.RegularExpressions;return u.Regex.replace$5(n,t,i,r,u.Regex._defaultMatchTimeout)},replace$5:function(n,t,i,r,u){var f=new System.Text.RegularExpressions.Regex.$ctor3(t,r,u,!0);return f.replace$3(n,i)},split:function(n,t){var i=System.Text.RegularExpressions;return i.Regex.split$2(n,t,i.RegexOptions.None,i.Regex._defaultMatchTimeout)},split$1:function(n,t,i){var r=System.Text.RegularExpressions;return r.Regex.split$2(n,t,i,r.Regex._defaultMatchTimeout)},split$2:function(n,t,i,r){var u=new System.Text.RegularExpressions.Regex.$ctor3(t,i,r,!0);return u.split(n)}},_pattern:"",_matchTimeout:System.TimeSpan.fromMilliseconds(-1),_runner:null,_caps:null,_capsize:0,_capnames:null,_capslist:null,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(n){this.$ctor1(n,System.Text.RegularExpressions.RegexOptions.None)},$ctor1:function(n,t){this.$ctor2(n,t,System.TimeSpan.fromMilliseconds(-1))},$ctor2:function(n,t,i){this.$ctor3(n,t,i,!1)},$ctor3:function(n,t,i){var r,u,f;if(this.$initialize(),r=System.Text.RegularExpressions,n==null)throw new System.ArgumentNullException("pattern");if(t>10!=0)throw new System.ArgumentOutOfRangeException("options");if((t&r.RegexOptions.ECMAScript)!=0&&(t&~(r.RegexOptions.ECMAScript|r.RegexOptions.IgnoreCase|r.RegexOptions.Multiline|r.RegexOptions.CultureInvariant))!=0)throw new System.ArgumentOutOfRangeException("options");if(u=System.Text.RegularExpressions.RegexOptions.IgnoreCase|System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.Singleline|System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace|System.Text.RegularExpressions.RegexOptions.ExplicitCapture,(t|u)!==u)throw new System.NotSupportedException("Specified Regex options are not supported.");this._validateMatchTimeout(i);this._pattern=n;this._options=t;this._matchTimeout=i;this._runner=new r.RegexRunner(this);f=this._runner.parsePattern();this._capnames=f.sparseSettings.sparseSlotNameMap;this._capslist=f.sparseSettings.sparseSlotNameMap.keys;this._capsize=this._capslist.length},getMatchTimeout:function(){return this._matchTimeout},getOptions:function(){return this._options},getRightToLeft:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.RightToLeft)!=0},isMatch:function(n){if(n==null)throw new System.ArgumentNullException("input");var t=this.getRightToLeft()?n.length:0;return this.isMatch$1(n,t)},isMatch$1:function(n,t){if(n==null)throw new System.ArgumentNullException("input");var i=this._runner.run(!0,-1,n,0,n.length,t);return i==null},match:function(n){if(n==null)throw new System.ArgumentNullException("input");var t=this.getRightToLeft()?n.length:0;return this.match$1(n,t)},match$1:function(n,t){if(n==null)throw new System.ArgumentNullException("input");return this._runner.run(!1,-1,n,0,n.length,t)},match$2:function(n,t,i){if(n==null)throw new System.ArgumentNullException("input");var r=this.getRightToLeft()?t+i:t;return this._runner.run(!1,-1,n,t,i,r)},matches:function(n){if(n==null)throw new System.ArgumentNullException("input");var t=this.getRightToLeft()?n.length:0;return this.matches$1(n,t)},matches$1:function(n,t){if(n==null)throw new System.ArgumentNullException("input");return new System.Text.RegularExpressions.MatchCollection(this,n,0,n.length,t)},getGroupNames:function(){if(this._capslist==null){for(var i=System.Globalization.CultureInfo.invariantCulture,t=[],r=this._capsize,n=0;n=0&&n=0&&n"9"||i<"0")return-1;t*=10;t+=i-"0"}return t>=0&&t0)||!(t<=2147483646)))throw new System.ArgumentOutOfRangeException("matchTimeout");}});Bridge.define("System.Text.RegularExpressions.Capture",{_text:"",_index:0,_length:0,ctor:function(n,t,i){this.$initialize();this._text=n;this._index=t;this._length=i},getIndex:function(){return this._index},getLength:function(){return this._length},getValue:function(){return this._text.substr(this._index,this._length)},toString:function(){return this.getValue()},_getOriginalString:function(){return this._text},_getLeftSubstring:function(){return this._text.slice(0,_index)},_getRightSubstring:function(){return this._text.slice(this._index+this._length,this._text.length)}});Bridge.define("System.Text.RegularExpressions.CaptureCollection",{inherits:function(){return[System.Collections.ICollection]},config:{alias:["getEnumerator","System$Collections$IEnumerable$getEnumerator","getCount","System$Collections$ICollection$getCount"]},_group:null,_capcount:0,_captures:null,ctor:function(n){this.$initialize();this._group=n;this._capcount=n._capcount},getSyncRoot:function(){return this._group},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},getCount:function(){return this._capcount},get:function(n){if(n===this._capcount-1&&n>=0)return this._group;if(n>=this._capcount||n<0)throw new System.ArgumentOutOfRangeException("i");return this._ensureCapturesInited(),this._captures[n]},copyTo:function(n,t){if(n==null)throw new System.ArgumentNullException("array");if(n.length0&&(t[this._capcount-1]=this._group);this._captures=t}}});Bridge.define("System.Text.RegularExpressions.CaptureEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"]},_captureColl:null,_curindex:0,ctor:function(n){this.$initialize();this._curindex=-1;this._captureColl=n},moveNext:function(){var n=this._captureColl.getCount();return this._curindex>=n?!1:(this._curindex++,this._curindex=this._captureColl.getCount())throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this._captureColl.get(this._curindex)},reset:function(){this._curindex=-1}});Bridge.define("System.Text.RegularExpressions.Group",{inherits:function(){return[System.Text.RegularExpressions.Capture]},statics:{config:{init:function(){var n=new System.Text.RegularExpressions.Group("",[],0);this.getEmpty=function(){return n}}},synchronized:function(n){if(n==null)throw new System.ArgumentNullException("group");var t=n.getCaptures();return t.getCount()>0&&t.get(0),n}},_caps:null,_capcount:0,_capColl:null,ctor:function(n,t,i){this.$initialize();var r=System.Text.RegularExpressions,u=i===0?0:t[(i-1)*2],f=i===0?0:t[i*2-1];r.Capture.ctor.call(this,n,u,f);this._caps=t;this._capcount=i},getSuccess:function(){return this._capcount!==0},getCaptures:function(){return this._capColl==null&&(this._capColl=new System.Text.RegularExpressions.CaptureCollection(this)),this._capColl}});Bridge.define("System.Text.RegularExpressions.GroupCollection",{inherits:function(){return[System.Collections.ICollection]},config:{alias:["getEnumerator","System$Collections$IEnumerable$getEnumerator","getCount","System$Collections$ICollection$getCount"]},_match:null,_captureMap:null,_groups:null,ctor:function(n,t){this.$initialize();this._match=n;this._captureMap=t},getSyncRoot:function(){return this._match},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},getCount:function(){return this._match._matchcount.length},get:function(n){return this._getGroup(n)},getByName:function(n){if(this._match._regex==null)return System.Text.RegularExpressions.Group.getEmpty();var t=this._match._regex.groupNumberFromName(n);return this._getGroup(t)},copyTo:function(n,t){var r,f,u,i;if(n==null)throw new System.ArgumentNullException("array");if(r=this.getCount(),n.length=this._match._matchcount.length||n<0?System.Text.RegularExpressions.Group.getEmpty():this._getGroupImpl(n),t},_getGroupImpl:function(n){return n===0?this._match:(this._ensureGroupsInited(),this._groups[n])},_ensureGroupsInited:function(){var n,i,r,u,t;if(this._groups==null){for(n=[],n.length=this._match._matchcount.length,n.length>0&&(n[0]=this._match),t=0;t=n?!1:(this._curindex++,this._curindex=this._groupColl.getCount())throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this._groupColl.get(this._curindex)},reset:function(){this._curindex=-1}});Bridge.define("System.Text.RegularExpressions.Match",{inherits:function(){return[System.Text.RegularExpressions.Group]},statics:{config:{init:function(){var n=new System.Text.RegularExpressions.Match(null,1,"",0,0,0);this.getEmpty=function(){return n}}},synchronized:function(n){if(n==null)throw new System.ArgumentNullException("match");for(var i=n.getGroups(),u=i.getCount(),r,t=0;t0&&this._matches[n][this._matchcount[n]*2-1]!==-2},_addMatch:function(n,t,i){var r,e,f,u;if(this._matches[n]==null&&(this._matches[n]=new Array(2)),r=this._matchcount[n],r*2+2>this._matches[n].length){for(e=this._matches[n],f=new Array(r*8),u=0;ut.Length)throw new System.ArgumentOutOfRangeException("startat");this._regex=n;this._input=t;this._beginning=i;this._length=r;this._startat=u;this._prevlen=-1;this._matches=[]},getCount:function(){return this._done||this._getMatch(2147483647),this._matches.length},getSyncRoot:function(){return this},getIsSynchronized:function(){return!1},getIsReadOnly:function(){return!0},get:function(n){var t=this._getMatch(n);if(t==null)throw new System.ArgumentOutOfRangeException("i");return t},copyTo:function(n,t){var r,f,u,i;if(n==null)throw new System.ArgumentNullException("array");if(r=this.getCount(),n.lengthn)return this._matches[n];if(this._done)return null;var t;do{if(t=this._regex._runner.run(!1,this._prevLen,this._input,this._beginning,this._length,this._startat),!t.getSuccess())return this._done=!0,null;this._matches.push(t);this._prevLen=t._length;this._startat=t._textpos}while(this._matches.length<=n);return t}});Bridge.define("System.Text.RegularExpressions.MatchEnumerator",{inherits:function(){return[System.Collections.IEnumerator]},config:{alias:["getCurrent","System$Collections$IEnumerator$getCurrent","moveNext","System$Collections$IEnumerator$moveNext","reset","System$Collections$IEnumerator$reset"]},_matchcoll:null,_match:null,_curindex:0,_done:!1,ctor:function(n){this.$initialize();this._matchcoll=n},moveNext:function(){return this._done?!1:(this._match=this._matchcoll._getMatch(this._curindex),this._curindex++,this._match==null)?(this._done=!0,!1):!0},getCurrent:function(){if(this._match==null)throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this._match},reset:function(){this._curindex=0;this._done=!1;this._match=null}});Bridge.define("System.Text.RegularExpressions.RegexOptions",{statics:{None:0,IgnoreCase:1,Multiline:2,ExplicitCapture:4,Compiled:8,Singleline:16,IgnorePatternWhitespace:32,RightToLeft:64,ECMAScript:256,CultureInvariant:512},$kind:"enum",$flags:!0});Bridge.define("System.Text.RegularExpressions.RegexRunner",{statics:{},_runregex:null,_netEngine:null,_runtext:"",_runtextpos:0,_runtextbeg:0,_runtextend:0,_runtextstart:0,_quick:!1,_prevlen:0,ctor:function(n){if(this.$initialize(),n==null)throw new System.ArgumentNullException("regex");this._runregex=n;var i=n.getOptions(),t=System.Text.RegularExpressions.RegexOptions,r=(i&t.IgnoreCase)===t.IgnoreCase,u=(i&t.Multiline)===t.Multiline,f=(i&t.Singleline)===t.Singleline,e=(i&t.IgnorePatternWhitespace)===t.IgnorePatternWhitespace,o=(i&t.ExplicitCapture)===t.ExplicitCapture,s=n._matchTimeout.getTotalMilliseconds();this._netEngine=new System.Text.RegularExpressions.RegexEngine(n._pattern,r,u,f,e,o,s)},run:function(n,t,i,r,u,f){var e,o,s,h;if(f<0||f>i.Length)throw new System.ArgumentOutOfRangeException("start","Start index cannot be less than 0 or greater than input length.");if(u<0||u>i.Length)throw new ArgumentOutOfRangeException("length","Length cannot be less than 0 or exceed input length.");if(this._runtext=i,this._runtextbeg=r,this._runtextend=r+u,this._runtextstart=f,this._quick=n,this._prevlen=t,this._runregex.getRightToLeft()?(e=this._runtextbeg,o=-1):(e=this._runtextend,o=1),this._prevlen===0){if(this._runtextstart===e)return System.Text.RegularExpressions.Match.getEmpty();this._runtextstart+=o}return s=this._netEngine.match(this._runtext,this._runtextstart),h=this._convertNetEngineResults(s),h},parsePattern:function(){return this._netEngine.parsePattern()},_convertNetEngineResults:function(n){var f,i,t,e,o,r,u,s;if(n.success&&this._quick)return null;if(!n.success)return System.Text.RegularExpressions.Match.getEmpty();for(f=this.parsePattern(),i=f.sparseSettings.isSparse?new System.Text.RegularExpressions.MatchSparse(this._runregex,f.sparseSettings.sparseSlotMap,n.groups.length,this._runtext,0,this._runtext.length,this._runtextstart):new System.Text.RegularExpressions.Match(this._runregex,n.groups.length,this._runtext,0,this._runtext.length,this._runtextstart),r=0;r=System.Text.RegularExpressions.RegexParser._E}},_caps:null,_capsize:0,_capnames:null,_pattern:"",_currentPos:0,_concatenation:null,_culture:null,config:{init:function(){this._options=System.Text.RegularExpressions.RegexOptions.None}},ctor:function(n){this.$initialize();this._culture=n;this._caps={}},_noteCaptures:function(n,t,i){this._caps=n;this._capsize=t;this._capnames=i},_setPattern:function(n){n==null&&(n="");this._pattern=n||"";this._currentPos=0},_scanReplacement:function(){this._concatenation=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Concatenate,this._options);for(var n,t,i;;){if(n=this._charsRight(),n===0)break;for(t=this._textpos();n>0&&this._rightChar()!=="$";)this._moveRight(),n--;this._addConcatenate(t,this._textpos()-t);n>0&&this._moveRightGetChar()==="$"&&(i=this._scanDollar(),this._concatenation.addChild(i))}return this._concatenation},_addConcatenate:function(n,t){var i,r,u;t!==0&&(t>1?(r=this._pattern.slice(n,n+t),i=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Multi,this._options,r)):(u=this._pattern[n],i=new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,u)),this._concatenation.addChild(i))},_useOptionE:function(){return(this._options&System.Text.RegularExpressions.RegexOptions.ECMAScript)!=0},_makeException:function(n){return new System.ArgumentException("Incorrect pattern. "+n)},_scanDollar:function(){var o=214748364,n,f,i,e,h;if(this._charsRight()===0)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$");var t=this._rightChar(),r,s=this._textpos(),u=s;if(t==="{"&&this._charsRight()>1?(r=!0,this._moveRight(),t=this._rightChar()):r=!1,t>="0"&&t<="9"){if(!r&&this._useOptionE()){for(n=-1,i=t-"0",this._moveRight(),this._isCaptureSlot(i)&&(n=i,u=this._textpos());this._charsRight()>0&&(t=this._rightChar())>="0"&&t<="9";){if(f=t-"0",i>o||i===o&&f>7)throw this._makeException("Capture group is out of range.");i=i*10+f;this._moveRight();this._isCaptureSlot(i)&&(n=i,u=this._textpos())}if(this._textto(u),n>=0)return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,n)}else if(n=this._scanDecimal(),(!r||this._charsRight()>0&&this._moveRightGetChar()==="}")&&this._isCaptureSlot(n))return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,n)}else if(r&&this._isWordChar(t)){if(e=this._scanCapname(),this._charsRight()>0&&this._moveRightGetChar()==="}"&&this._isCaptureName(e))return h=this._captureSlotFromName(e),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,h)}else if(!r){n=1;switch(t){case"$":return this._moveRight(),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$");case"&":n=0;break;case"`":n=System.Text.RegularExpressions.RegexReplacement.LeftPortion;break;case"'":n=System.Text.RegularExpressions.RegexReplacement.RightPortion;break;case"+":n=System.Text.RegularExpressions.RegexReplacement.LastGroup;break;case"_":n=System.Text.RegularExpressions.RegexReplacement.WholeString}if(n!==1)return this._moveRight(),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref,this._options,n)}return this._textto(s),new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One,this._options,"$")},_scanDecimal:function(){for(var r=214748364,n=0,t,i;this._charsRight()>0;){if(t=this._rightChar(),t<"0"||t>"9")break;if(i=t-"0",this._moveRight(),n>r||n===r&&i>7)throw this._makeException("Capture group is out of range.");n*=10;n+=i}return n},_scanOctal:function(){var i,n,t;for(t=3,t>this._charsRight()&&(t=this._charsRight()),n=0;t>0&&(i=this._rightChar()-"0")<=7;t-=1)if(this._moveRight(),n*=8,n+=i,this._useOptionE()&&n>=32)break;return n&=255,String.fromCharCode(n)},_scanHex:function(n){var t,i;if(t=0,this._charsRight()>=n)for(;n>0&&(i=this._hexDigit(this._moveRightGetChar()))>=0;n-=1)t*=16,t+=i;if(n>0)throw this._makeException("Insufficient hexadecimal digits.");return t},_hexDigit:function(n){var t,i=n.charCodeAt(0);return(t=i-"0".charCodeAt(0))<=9?t:(t=i-"a".charCodeAt(0))<=5?t+10:(t=i-"A".charCodeAt(0))<=5?t+10:-1},_scanControl:function(){if(this._charsRight()<=0)throw this._makeException("Missing control character.");var t=this._moveRightGetChar(),n=t.charCodeAt(0);if(n>="a".charCodeAt(0)&&n<="z".charCodeAt(0)&&(n=n-("a".charCodeAt(0)-"A".charCodeAt(0))),(n=n-"@".charCodeAt(0))<" ".charCodeAt(0))return String.fromCharCode(n);throw this._makeException("Unrecognized control character.");},_scanCapname:function(){for(var n=this._textpos();this._charsRight()>0;)if(!this._isWordChar(this._moveRightGetChar())){this._moveLeft();break}return _pattern.slice(n,this._textpos())},_scanCharEscape:function(){var n=this._moveRightGetChar(),t;if(n>="0"&&n<="7")return this._moveLeft(),this._scanOctal();switch(n){case"x":return this._scanHex(2);case"u":return this._scanHex(4);case"a":return"\x07";case"b":return"\b";case"e":return"\x1b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\x0b";case"c":return this._scanControl();default:if(t=n==="8"||n==="9"||n==="_",t||!this._useOptionE()&&this._isWordChar(n))throw this._makeException("Unrecognized escape sequence \\"+n+".");return n}},_captureSlotFromName:function(n){return this._capnames[n]},_isCaptureSlot:function(n){return this._caps!=null?this._caps[n]!=null:n>=0&&n0?!0:!1}});Bridge.define("System.Text.RegularExpressions.RegexReplacement",{statics:{replace:function(n,t,i,r,u){var f,o,e,s,h,c,l;if(n==null)throw new System.ArgumentNullException("evaluator");if(r<-1)throw new System.ArgumentOutOfRangeException("count","Count cannot be less than -1.");if(u<0||u>i.length)throw new System.ArgumentOutOfRangeException("startat","Start index cannot be less than 0 or greater than input length.");if(r===0)return i;if(f=t.match$1(i,u),f.getSuccess()){if(o="",t.getRightToLeft()){c=[];e=i.length;do{if(s=f.getIndex(),h=f.getLength(),s+h!==e&&c.push(i.slice(s+h,e)),e=s,c.push(n(f)),--r==0)break;f=f.nextMatch()}while(f.getSuccess());for(o=new StringBuilder,e>0&&(o+=o.slice(0,e)),l=c.length-1;l>=0;l--)o+=c[l]}else{e=0;do{if(s=f.getIndex(),h=f.getLength(),s!==e&&(o+=i.slice(e,s)),e=s+h,o+=n(f),--r==0)break;f=f.nextMatch()}while(f.getSuccess());et.length)throw new System.ArgumentOutOfRangeException("startat","Start index cannot be less than 0 or greater than input length.");if(f=[],i===1)return f.push(t),f;if(--i,u=n.match$1(t,r),u.getSuccess())if(n.getRightToLeft()){for(o=t.length;;){for(s=u.getIndex(),c=u.getLength(),h=u.getGroups(),l=h.getCount(),f.push(t.slice(s+c,o)),o=s,e=1;e0&&(e.push(u.length),u.push(r),r="");f=o._m;i!=null&&f>=0&&(f=i[f]);e.push(-System.Text.RegularExpressions.RegexReplacement.Specials-1-f);break;default:throw new System.ArgumentException("Replacement error.");}}r.length>0&&(e.push(u.length),u.push(r));this._strings=u;this._rules=e},getPattern:function(){return _rep},replacement:function(n){return this._replacementImpl("",n)},replace:function(n,t,i,r){var u,e,f,o,s,h,c;if(i<-1)throw new System.ArgumentOutOfRangeException("count","Count cannot be less than -1.");if(r<0||r>t.length)throw new System.ArgumentOutOfRangeException("startat","Start index cannot be less than 0 or greater than input length.");if(i===0)return t;if(u=n.match$1(t,r),u.getSuccess()){if(e="",n.getRightToLeft()){h=[];f=t.length;do{if(o=u.getIndex(),s=u.getLength(),o+s!==f&&h.push(t.slice(o+s,f)),f=o,this._replacementImplRTL(h,u),--i==0)break;u=u.nextMatch()}while(u.getSuccess());for(f>0&&(e+=e.slice(0,f)),c=h.length-1;c>=0;c--)e+=h[c]}else{f=0;do{if(o=u.getIndex(),s=u.getLength(),o!==f&&(e+=t.slice(f,o)),f=o+s,e=this._replacementImpl(e,u),--i==0)break;u=u.nextMatch()}while(u.getSuccess());f=0)n+=this._strings[i];else if(i<-u)n+=t._groupToStringImpl(-u-1-i);else switch(-u-1-i){case System.Text.RegularExpressions.RegexReplacement.LeftPortion:n+=t._getLeftSubstring();break;case System.Text.RegularExpressions.RegexReplacement.RightPortion:n+=t._getRightSubstring();break;case System.Text.RegularExpressions.RegexReplacement.LastGroup:n+=t._lastGroupToStringImpl();break;case System.Text.RegularExpressions.RegexReplacement.WholeString:n+=t._getOriginalString()}return n},_replacementImplRTL:function(n,t){for(var u=System.Text.RegularExpressions.RegexReplacement.Specials,i,r=_rules.length-1;r>=0;r--)if(i=this._rules[r],i>=0)n.push(this._strings[i]);else if(i<-u)n.push(t._groupToStringImpl(-u-1-i));else switch(-u-1-i){case System.Text.RegularExpressions.RegexReplacement.LeftPortion:n.push(t._getLeftSubstring());break;case System.Text.RegularExpressions.RegexReplacement.RightPortion:n.push(t._getRightSubstring());break;case System.Text.RegularExpressions.RegexReplacement.LastGroup:n.push(t._lastGroupToStringImpl());break;case System.Text.RegularExpressions.RegexReplacement.WholeString:n.push(t._getOriginalString())}}});Bridge.define("System.Text.RegularExpressions.RegexEngine",{_pattern:"",_patternInfo:null,_text:"",_textStart:0,_timeoutMs:-1,_timeoutTime:-1,_settings:null,_branchType:{base:0,offset:1,lazy:2,greedy:3,or:4},_branchResultKind:{ok:1,endPass:2,nextPass:3,nextBranch:4},ctor:function(n,t,i,r,u,f,e){if(this.$initialize(),n==null)throw new System.ArgumentNullException("pattern");this._pattern=n;this._timeoutMs=e;this._settings={ignoreCase:t,multiline:i,singleline:r,ignoreWhitespace:u,explicitCapture:f}},match:function(n,t){var i;if(n==null)throw new System.ArgumentNullException("text");if(t!=null&&(t<0||t>n.length))throw new System.ArgumentOutOfRangeException("textStart","Start index cannot be less than 0 or greater than input length.");return(this._text=n,this._textStart=t,this._timeoutTime=this._timeoutMs>0?(new Date).getTime()+System.Convert.toInt32(this._timeoutMs+.5):-1,i=this.parsePattern(),i.shouldFail)?this._getEmptyMatch():(this._checkTimeout(),this._scanAndTransformResult(t,i.tokens,!1,null))},parsePattern:function(){if(this._patternInfo==null){var n=System.Text.RegularExpressions.RegexEngineParser,t=n.parsePattern(this._pattern,this._cloneSettings(this._settings));this._patternInfo=t}return this._patternInfo},_scanAndTransformResult:function(n,t,i,r){var u=this._scan(n,this._text.length,t,i,r);return this._collectScanResults(u,n)},_scan:function(n,t,i,r,u){var c=this._branchResultKind,f=[],e,h,o;if(f.grCaptureCache={},e=null,h=null,i.length===0)return o=new System.Text.RegularExpressions.RegexEngineState,o.capIndex=n,o.txtIndex=n,o.capLength=0,o;var l=r?this._branchType.base:this._branchType.offset,a=this._patternInfo.isContiguous?n:t,s=new System.Text.RegularExpressions.RegexEngineBranch(l,n,n,a);for(s.pushPass(0,i,this._cloneSettings(this._settings)),s.started=!0,s.state.txtIndex=n,f.push(s);f.length;){if(e=f[f.length-1],h=this._scanBranch(t,f,e),h===c.ok&&(u==null||e.state.capLength===u))return e.state;this._advanceToNextBranch(f,e);this._checkTimeout()}return null},_scanBranch:function(n,t,i){var r=this._branchResultKind,u,f;if(i.mustFail)return i.mustFail=!1,r.nextBranch;while(i.hasPass()){if(u=i.peekPass(),u.tokens==null||u.tokens.length===0)f=r.endPass;else{if(this._addAlternationBranches(t,i,u)===r.nextBranch)return r.nextBranch;f=this._scanPass(n,t,i,u)}switch(f){case r.nextBranch:return f;case r.nextPass:continue;case r.endPass:case r.ok:i.popPass();break;default:throw new System.InvalidOperationException("Unexpected branch result.");}}return r.ok},_scanPass:function(n,t,i,r){for(var f=this._branchResultKind,s=r.tokens.length,o,u,e;r.index1){for(r=0;rt.max&&n.pop();else if(n.pop(),!t.isNotFailing){i=n[n.length-1];this._advanceToNextBranch(n,i);return}}},_collectScanResults:function(n,t){var o=this._patternInfo.groups,a=this._text,l={},s,f,h={},r,e,i,u,c=this._getEmptyMatch();if(n!=null){for(s=n.groups,this._fillMatch(c,n.capIndex,n.capLength,t),u=0;u0&&(e=i.captures[i.captures.length-1],i.capIndex=e.capIndex,i.capLength=e.capLength,i.value=e.value,i.success=!0),l[r.name]=!0,i.descriptor=r,c.groups.push(i))}return c},_scanToken:function(n,t,i,r,u){var f=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,e=this._branchResultKind;switch(u.type){case f.group:case f.groupImnsx:case f.alternationGroup:return this._scanGroupToken(n,t,i,r,u);case f.groupImnsxMisc:return this._scanGroupImnsxToken(u.group.constructs,r.settings);case f.charGroup:return this._scanCharGroupToken(t,i,r,u,!1);case f.charNegativeGroup:return this._scanCharNegativeGroupToken(t,i,r,u,!1);case f.escChar:case f.escCharOctal:case f.escCharHex:case f.escCharUnicode:case f.escCharCtrl:return this._scanLiteral(n,t,i,r,u.data.ch);case f.escCharOther:case f.escCharClass:return this._scanEscapeToken(t,i,r,u);case f.escCharClassCategory:throw new System.NotSupportedException("Unicode Category constructions are not supported.");case f.escCharClassBlock:throw new System.NotSupportedException("Unicode Named block constructions are not supported.");case f.escCharClassDot:return this._scanDotToken(n,t,i,r);case f.escBackrefNumber:return this._scanBackrefNumberToken(n,t,i,r,u);case f.escBackrefName:return this._scanBackrefNameToken(n,t,i,r,u);case f.anchor:case f.escAnchor:return this._scanAnchorToken(n,t,i,r,u);case f.groupConstruct:case f.groupConstructName:case f.groupConstructImnsx:case f.groupConstructImnsxMisc:return e.ok;case f.alternationGroupCondition:case f.alternationGroupRefNameCondition:case f.alternationGroupRefNumberCondition:return this._scanAlternationConditionToken(n,t,i,r,u);case f.alternation:return e.endPass;case f.commentInline:case f.commentXMode:return e.ok;default:return this._scanLiteral(n,t,i,r,u.value)}},_scanGroupToken:function(n,t,i,r,u){var h=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,c=this._branchResultKind,o=i.state.txtIndex,l,f;if(r.onHold){if(u.type===h.group){var a=u.group.rawIndex,s=r.onHoldTextIndex,v=o-s,e=t.grCaptureCache[a];if(e==null&&(e={},t.grCaptureCache[a]=e),l=s.toString()+"_"+v.toString(),e[l]==null)e[l]=!0;else return c.nextBranch;u.group.constructs.emptyCapture||(u.group.isBalancing?i.state.logCaptureGroupBalancing(u.group,s):i.state.logCaptureGroup(u.group,s,v))}return r.onHold=!1,r.onHoldTextIndex=-1,c.ok}if(u.type===h.group||u.type===h.groupImnsx){if(f=u.group.constructs,this._scanGroupImnsxToken(f,r.settings),f.isPositiveLookahead||f.isNegativeLookahead||f.isPositiveLookbehind||f.isNegativeLookbehind)return this._scanLook(i,o,n,u);if(f.isNonbacktracking)return this._scanNonBacktracking(i,o,n,u)}return r.onHoldTextIndex=o,r.onHold=!0,i.pushPass(0,u.children,this._cloneSettings(r.settings)),c.nextPass},_scanGroupImnsxToken:function(n,t){var i=this._branchResultKind;return n.isIgnoreCase!=null&&(t.ignoreCase=n.isIgnoreCase),n.isMultiline!=null&&(t.multiline=n.isMultiline),n.isSingleLine!=null&&(t.singleline=n.isSingleLine),n.isIgnoreWhitespace!=null&&(t.ignoreWhitespace=n.isIgnoreWhitespace),n.isExplicitCapture!=null&&(t.explicitCapture=n.isExplicitCapture),i.ok},_scanAlternationConditionToken:function(n,t,i,r,u){var o=System.Text.RegularExpressions.RegexEngineParser.tokenTypes,f=this._branchResultKind,c=u.children,l=i.state.txtIndex,e=f.nextBranch,s,h;return u.type===o.alternationGroupRefNameCondition||u.type===o.alternationGroupRefNumberCondition?(s=i.state.resolveBackref(u.data.packedSlotId),e=s!=null?f.ok:f.nextBranch):(h=this._scan(l,n,c,!0,null),this._combineScanResults(i,h)&&(e=f.ok)),e===f.nextBranch&&r.tokens.noAlternation&&(e=f.endPass),e},_scanLook:function(n,t,i,r){var u=r.group.constructs,e=this._branchResultKind,f=r.children,o,s,h=u.isPositiveLookahead||u.isNegativeLookahead,c=u.isPositiveLookbehind||u.isNegativeLookbehind;return h||c?(f=f.slice(1,f.length),o=u.isPositiveLookahead||u.isPositiveLookbehind,s=h?this._scanLookAhead(n,t,i,f):this._scanLookBehind(n,t,i,f),o===s?e.ok:e.nextBranch):null},_scanLookAhead:function(n,t,i,r){var u=this._scan(t,i,r,!0,null);return this._combineScanResults(n,u)},_scanLookBehind:function(n,t,i,r){for(var u=t,f,e;u>=0;){if(f=t-u,e=this._scan(u,i,r,!0,f),this._combineScanResults(n,e))return!0;--u}return!1},_scanNonBacktracking:function(n,t,i,r){var e=this._branchResultKind,u=r.children,f;return(u=u.slice(1,u.length),f=this._scan(t,i,u,!0,null),!f)?e.nextBranch:(n.state.logCapture(f.capLength),e.ok)},_scanLiteral:function(n,t,i,r,u){var e=this._branchResultKind,o=i.state.txtIndex,f;if(o+u.length>n)return e.nextBranch;if(r.settings.ignoreCase){for(f=0;fh)break;if(h<=v.m)return u||t.state.logCapture(1),f.ok}c==null&&i.settings.ignoreCase&&(c=e.toUpperCase(),e=e===c?e.toLowerCase():c,h=e.charCodeAt(0))}return f.nextBranch},_scanCharNegativeGroupToken:function(n,t,i,r,u){var f=this._branchResultKind,o=t.state.txtIndex,s=this._text[o],e;return s==null?f.nextBranch:(e=this._scanCharGroupToken(n,t,i,r,!0),e===f.ok)?f.nextBranch:(u||t.state.logCapture(1),f.ok)},_scanEscapeToken:function(n,t,i,r){return this._scanWithJsRegex(n,t,i,r)},_scanDotToken:function(n,t,i,r){var u=this._branchResultKind,f=i.state.txtIndex;if(r.settings.singleline){if(f0&&this._scanWithJsRegex2(f-1,"\\w")===e.ok,s=this._scanWithJsRegex2(f,"\\w")===e.ok,o===s==(u.value==="\\B"))return e.ok}else if(u.value==="^"){if(f===0||r.settings.multiline&&this._text[f-1]==="\n")return e.ok}else if(u.value==="$"){if(f===n||r.settings.multiline&&this._text[f]==="\n")return e.ok}else if(u.value==="\\A"){if(f===0)return e.ok}else if(u.value==="\\z"){if(f===n)return e.ok}else if(u.value==="\\Z"){if(f===n||f===n-1&&this._text[f]==="\n")return e.ok}else if(u.value==="\\G")return e.ok;return e.nextBranch},_cloneSettings:function(n){return{ignoreCase:n.ignoreCase,multiline:n.multiline,singleline:n.singleline,ignoreWhitespace:n.ignoreWhitespace,explicitCapture:n.explicitCapture}},_combineScanResults:function(n,t){if(t!=null){for(var u=n.state.groups,r=t.groups,f=r.length,i=0;i=this._timeoutTime)throw new System.RegexMatchTimeoutException(this._text,this._pattern,System.TimeSpan.fromMilliseconds(this._timeoutMs));}}});Bridge.define("System.Text.RegularExpressions.RegexEngineBranch",{type:0,value:0,min:0,max:0,isStarted:!1,isNotFailing:!1,state:null,ctor:function(n,t,i,r,u){this.$initialize();this.type=n;this.value=t;this.min=i;this.max=r;this.state=u!=null?u.clone():new System.Text.RegularExpressions.RegexEngineState},pushPass:function(n,t,i){var r=new System.Text.RegularExpressions.RegexEnginePass(n,t,i);this.state.passes.push(r)},peekPass:function(){return this.state.passes[this.state.passes.length-1]},popPass:function(){return this.state.passes.pop()},hasPass:function(){return this.state.passes.length>0},clone:function(){var n=new System.Text.RegularExpressions.RegexEngineBranch(this.type,this.value,this.min,this.max,this.state);return n.isNotFailing=this.isNotFailing,n}});Bridge.define("System.Text.RegularExpressions.RegexEngineState",{txtIndex:0,capIndex:null,capLength:0,passes:null,groups:null,ctor:function(){this.$initialize();this.passes=[];this.groups=[]},logCapture:function(n){this.capIndex==null&&(this.capIndex=this.txtIndex);this.txtIndex+=n;this.capLength+=n},logCaptureGroup:function(n,t,i){this.groups.push({rawIndex:n.rawIndex,slotId:n.packedSlotId,capIndex:t,capLength:i})},logCaptureGroupBalancing:function(n,t){for(var s=n.balancingSlotId,r=this.groups,i=r.length-1,u,f,e,o;i>=0;){if(r[i].slotId===s){u=r[i];f=i;break}--i}return u!=null&&f!=null?(r.splice(f,1),n.constructs.name1!=null&&(e=u.capIndex+u.capLength,o=t-e,this.logCaptureGroup(n,e,o)),!0):!1},resolveBackref:function(n){for(var i=this.groups,t=i.length-1;t>=0;){if(i[t].slotId===n)return i[t];--t}return null},clone:function(){var t=new System.Text.RegularExpressions.RegexEngineState,e,u;t.txtIndex=this.txtIndex;t.capIndex=this.capIndex;t.capLength=this.capLength;for(var o=t.passes,f=this.passes,r=f.length,i,n=0;n0&&!e.qtoken&&(a=t[o-1],a.type===s.literal&&!a.qtoken)){a.value+=e.value;a.length+=e.length;t.splice(o,1);--o;continue}}else if(e.type===s.alternationGroupCondition&&e.data!=null)if(e.data.number!=null){if(h=i.getPackedSlotIdBySlotNumber(e.data.number),h==null)throw new System.ArgumentException("Reference to undefined group number "+c+".");e.data.packedSlotId=h;l._updatePatternToken(e,s.alternationGroupRefNumberCondition,e.index,e.length,e.value)}else h=i.getPackedSlotIdBySlotName(e.data.name),h!=null?(e.data.packedSlotId=h,l._updatePatternToken(e,s.alternationGroupRefNameCondition,e.index,e.length,e.value)):delete e.data;e.children&&e.children.length&&(v=e.type===s.group?[e.group.rawIndex]:[],v=v.concat(u),y=e.localSettings||n,l._transformRawTokens(y,e.children,i,r,v,f+1),n.shouldFail=n.shouldFail||y.shouldFail,n.isContiguous=n.isContiguous||y.isContiguous);e.type===s.group&&r.push(e.group.packedSlotId)}},_fillGroupDescriptors:function(n,t){var f=System.Text.RegularExpressions.RegexEngineParser,i,r,u;for(f._fillGroupStructure(t,n,null),u=1,r=0;r1&&(i.isSparse=!0);i.lastSlot=t},_addSparseSlotForSameNamedGroups:function(n,t,i,r){var o=System.Text.RegularExpressions.RegexEngineParser,u,f,e;if(o._addSparseSlot(n[0],t,i,r),f=n[0].sparseSlotId,e=n[0].packedSlotId,n.length>1)for(u=1;u":t.isNonbacktracking=!0;break;case"?<=":t.isPositiveLookbehind=!0;break;case"?2)throw new System.ArgumentException("Invalid group name.");i[0].length&&(t.name1=i[0],h=o._validateGroupName(i[0]),t.isNumberName1=h.isNumberName);i.length===2&&(t.name2=i[1],c=o._validateGroupName(i[1]),t.isNumberName2=c.isNumberName)}else if(n.type===f.groupConstructImnsx||n.type===f.groupConstructImnsxMisc)for(var l=n.type===f.groupConstructImnsx?1:0,a=n.length-1-l,u=!0,r,e=1;e<=a;e++)r=n.value[e],r==="-"?u=!1:r==="i"?t.isIgnoreCase=u:r==="m"?t.isMultiline=u:r==="n"?t.isExplicitCapture=u:r==="s"?t.isSingleLine=u:r==="x"&&(t.isIgnoreWhitespace=u);return t},_validateGroupName:function(n){var t,i,r;if(!n||!n.length)throw new System.ArgumentException("Invalid group name: Group names must begin with a word character.");if(t=n[0]>="0"&&n[0]<="9",t&&(i=System.Text.RegularExpressions.RegexEngineParser,r=i._matchChars(n,0,n.length,i._decSymbols),r.matchLength!==n.length))throw new System.ArgumentException("Invalid group name: Group names must begin with a word character.");return{isNumberName:t}},_fillBalancingGroupInfo:function(n,t){for(var i,r=0;r=1&&i.getPackedSlotIdBySlotNumber(f)!=null)continue;if(f<=9)throw new System.ArgumentException("Reference to undefined group number "+f.toString()+".");if(e=u._parseOctalCharToken(r.value,0,r.length),e==null)throw new System.ArgumentException("Unrecognized escape sequence "+r.value.slice(0,2)+".");h=r.length-e.length;u._modifyPatternToken(r,n,s.escCharOctal,null,e.length);r.data=e.data;h>0&&(c=u._createPatternToken(n,s.literal,r.index+r.length,h),t.splice(o+1,0,c))}r.children&&r.children.length&&u._preTransformBackrefTokens(n,r.children,i)}},_updateGroupDescriptors:function(n,t){for(var o=System.Text.RegularExpressions.RegexEngineParser,e=o.tokenTypes,r,i,f,h,c,s=t||0,u=0;un.length)throw new System.ArgumentOutOfRangeException("startIndex");if(rn.length)throw new System.ArgumentOutOfRangeException("endIndex");for(var f=System.Text.RegularExpressions.RegexEngineParser,h=f.tokenTypes,s=[],o,e,u=i;u=0){++u;continue}o=e==="."?f._parseDotToken(n,u,r):e==="\\"?f._parseEscapeToken(n,u,r):e==="["?f._parseCharRangeToken(n,u,r):e==="^"||e==="$"?f._parseAnchorToken(n,u):e==="("?f._parseGroupToken(n,t,u,r):e==="|"?f._parseAlternationToken(n,u):e==="#"&&t.ignoreWhitespace?f._parseXModeCommentToken(n,u,r):f._parseQuantifierToken(n,u,r);o==null&&(o=f._createPatternToken(n,h.literal,u,1));o!=null&&(s.push(o),u+=o.length)}return s},_parseEscapeToken:function(n,t,i){var u=System.Text.RegularExpressions.RegexEngineParser,o=u.tokenTypes,f=n[t],h,c,l,s,y,e,a,r,v;if(f!=="\\")return null;if(t+1>=i)throw new System.ArgumentException("Illegal \\ at end of pattern.");if(f=n[t+1],f>="1"&&f<="9")return h=u._matchChars(n,t+1,i,u._decSymbols,3),c=u._createPatternToken(n,o.escBackrefNumber,t,1+h.matchLength),c.data={number:parseInt(h.match,10)},c;if(u._escapedAnchors.indexOf(f)>=0)return u._createPatternToken(n,o.escAnchor,t,2);if(l=u._parseEscapedChar(n,t,i),l!=null)return l;if(f==="k"){if(t+2":"'",e=u._matchUntil(n,t+3,i,y),e.unmatchLength===1&&e.matchLength>0)))return a=u._createPatternToken(n,o.escBackrefName,t,3+e.matchLength+1),a.data={name:e.match},a;throw new System.ArgumentException("Malformed \\k<...> named back reference.");}if(r=f.charCodeAt(0),r>=0&&r<48||r>57&&r<65||r>90&&r<95||r===96||r>122&&r<128)return v=u._createPatternToken(n,o.escChar,t,2),v.data={n:r,ch:f},v;throw new System.ArgumentException("Unrecognized escape sequence \\"+f+".");},_parseOctalCharToken:function(n,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,s=r.tokenTypes,u=n[t];if(u==="\\"&&t+1="0"&&u<="7")){var f=r._matchChars(n,t+1,i,r._octSymbols,3),e=parseInt(f.match,8),o=r._createPatternToken(n,s.escCharOctal,t,1+f.matchLength);return o.data={n:e,ch:String.fromCharCode(e)},o}return null},_parseEscapedChar:function(n,t,i){var r=System.Text.RegularExpressions.RegexEngineParser,o=r.tokenTypes,f,u=n[t],a,v,h,c,y,p,e,s,l;if(u!=="\\"||t+1>=i)return null;if(u=n[t+1],r._escapedChars.indexOf(u)>=0){if(u==="x"){if(a=r._matchChars(n,t+2,i,r._hexSymbols,2),a.matchLength!==2)throw new System.ArgumentException("Insufficient hexadecimal digits.");return v=parseInt(a.match,16),f=r._createPatternToken(n,o.escCharHex,t,4),f.data={n:v,ch:String.fromCharCode(v)},f}if(u==="c"){if(t+2>=i)throw new System.ArgumentException("Missing control character.");if(h=n[t+2],h=h.toUpperCase(),c=this._controlChars.indexOf(h),c>=0)return f=r._createPatternToken(n,o.escCharCtrl,t,3),f.data={n:c,ch:String.fromCharCode(c)},f;throw new System.ArgumentException("Unrecognized control character.");}else if(u==="u"){if(y=r._matchChars(n,t+2,i,r._hexSymbols,4),y.matchLength!==4)throw new System.ArgumentException("Insufficient hexadecimal digits.");return p=parseInt(y.match,16),f=r._createPatternToken(n,o.escCharUnicode,t,6),f.data={n:p,ch:String.fromCharCode(p)},f}f=r._createPatternToken(n,o.escChar,t,2);switch(u){case"a":e=7;break;case"b":e=8;break;case"t":e=9;break;case"r":e=13;break;case"v":e=11;break;case"f":e=12;break;case"n":e=10;break;case"e":e=27;break;default:throw new System.ArgumentException("Unexpected escaped char: '"+u+"'.");}return f.data={n:e,ch:String.fromCharCode(e)},f}if(u>="0"&&u<="7")return r._parseOctalCharToken(n,t,i);if(r._escapedCharClasses.indexOf(u)>=0){if(u==="p"||u==="P"){if(s=r._matchUntil(n,t+2,i,"}"),s.matchLength<2||s.match[0]!=="{"||s.unmatchLength!==1)throw new System.ArgumentException("Incomplete p{X} character escape.");if(l=s.match.slice(1),r._unicodeCategories.indexOf(l)>=0)return r._createPatternToken(n,o.escCharClassCategory,t,2+s.matchLength+1);if(r._namedCharBlocks.indexOf(l)>=0)return r._createPatternToken(n,o.escCharClassBlock,t,2+s.matchLength+1);throw new System.ArgumentException("Unknown property '"+l+"'.");}return r._createPatternToken(n,o.escCharClass,t,2)}return r._escapedSpecialSymbols.indexOf(u)>=0?(f=r._createPatternToken(n,o.escCharOther,t,2),f.data={n:u.charCodeAt(0),ch:u},f):null},_parseCharRangeToken:function(n,t,i){var e=System.Text.RegularExpressions.RegexEngineParser,a=e.tokenTypes,u=[],v,o,f,y=!1,p=!1,w=!1,s=n[t],r,h,c,b,l,k;if(s!=="[")return null;for(r=t+1,h=-1,rb){h=r;break}else f=e._createPatternToken(n,a.literal,r,1),c=1;if(p)throw new System.ArgumentException("A subtraction must be the last element in a character class.");u.length>1&&(v=e._parseCharIntervalToken(n,u[u.length-2],u[u.length-1],f),v!=null&&(u.pop(),u.pop(),f=v));f!=null&&(u.push(f),r+=c)}if(h<0||u.length<1)throw new System.ArgumentException("Unterminated [] set.");return l=y?e._createPatternToken(n,a.charNegativeGroup,t,1+h-t,u,"[^","]"):e._createPatternToken(n,a.charGroup,t,1+h-t,u,"[","]"),k=e._tidyCharRange(u),l.data={ranges:k},o!=null&&(l.data.substractToken=o),l},_parseCharIntervalToken:function(n,t,i,r){var h=System.Text.RegularExpressions.RegexEngineParser,u=h.tokenTypes,f,o,e,s;if(i.type!==u.literal||i.value!=="-"||t.type!==u.literal&&t.type!==u.escChar&&t.type!==u.escCharOctal&&t.type!==u.escCharHex&&t.type!==u.escCharCtrl&&t.type!==u.escCharUnicode&&t.type!==u.escCharOther||r.type!==u.literal&&r.type!==u.escChar&&r.type!==u.escCharOctal&&r.type!==u.escCharHex&&r.type!==u.escCharCtrl&&r.type!==u.escCharUnicode&&r.type!==u.escCharOther)return null;if(t.type===u.literal?(f=t.value.charCodeAt(0),o=t.value):(f=t.data.n,o=t.data.ch),r.type===u.literal?(e=r.value.charCodeAt(0),s=r.value):(e=r.data.n,s=r.data.ch),f>e)throw new System.NotSupportedException("[x-y] range in reverse order.");var l=t.index,a=t.length+i.length+r.length,c=h._createPatternToken(n,u.charInterval,l,a,[t,i,r],"","");return c.data={startN:f,startCh:o,endN:e,endCh:s},c},_tidyCharRange:function(n){for(var l=System.Text.RegularExpressions.RegexEngineParser,i=l.tokenTypes,f,e,o,t,r=[],a=[],s,h,c,v,u=0;ue)break;r.splice(f,0,{n:e,m:o})}for(u=0;u1+s.m)break;c++;h.m>s.m&&(s.m=h.m)}c>0&&r.splice(u+1,c)}return a.length>0&&(v="["+l._constructPattern(a)+"]",r.charClassToken=l._createPatternToken(v,i.charGroup,0,v.length,n,"[","]")),r},_parseDotToken:function(n,t){var i=System.Text.RegularExpressions.RegexEngineParser,r=i.tokenTypes,u=n[t];return u!=="."?null:i._createPatternToken(n,r.escCharClassDot,t,1)},_parseAnchorToken:function(n,t){var i=System.Text.RegularExpressions.RegexEngineParser,u=i.tokenTypes,r=n[t];return r!=="^"&&r!=="$"?null:i._createPatternToken(n,u.anchor,t,1)},_updateSettingsFromConstructs:function(n,t){t.isIgnoreWhitespace!=null&&(n.ignoreWhitespace=t.isIgnoreWhitespace);t.isExplicitCapture!=null&&(n.explicitCapture=t.isExplicitCapture)},_parseGroupToken:function(n,t,i,r){var s=System.Text.RegularExpressions.RegexEngineParser,u=s.tokenTypes,a={ignoreWhitespace:t.ignoreWhitespace,explicitCapture:t.explicitCapture},e=n[i],h,c,l,ft,et,p,w,ot,b,nt;if(e!=="(")return null;var k=1,y=!1,d=i+1,o=-1,g=!1,tt=!1,it=!1,rt=!1,ut=!1,v=null,f=s._parseGroupConstructToken(n,a,i+1,r);for(f!=null&&(v=this._fillGroupConstructs(f),d+=f.length,f.type===u.commentInline?g=!0:f.type===u.alternationGroupCondition?tt=!0:f.type===u.groupConstructImnsx?(this._updateSettingsFromConstructs(a,v),rt=!0):f.type===u.groupConstructImnsxMisc&&(this._updateSettingsFromConstructs(t,v),it=!0)),a.explicitCapture&&(v==null||v.name1==null)&&(ut=!0),h=d;h1))throw new System.ArgumentException("Too many | in (?()|).");if(w===0)throw new System.NotSupportedException("Alternation group without | is not supported.");ot=s._createPatternToken(n,u.alternationGroup,i,1+o-i,l,"(",")");c=ot}else b=u.group,it?b=u.groupImnsxMisc:rt&&(b=u.groupImnsx),nt=s._createPatternToken(n,b,i,1+o-i,l,"(",")"),nt.localSettings=a,c=nt}return ut&&(c.isNonCapturingExplicit=!0),c},_parseGroupConstructToken:function(n,t,i,r){var f=System.Text.RegularExpressions.RegexEngineParser,o=f.tokenTypes,u=n[i],h,c,s,l,e,a,v;if(u!=="?"||i+1>=r)return null;if(u=n[i+1],u===":"||u==="="||u==="!"||u===">")return f._createPatternToken(n,o.groupConstruct,i,2);if(u==="#")return f._createPatternToken(n,o.commentInline,i,2);if(u==="(")return f._parseAlternationGroupConditionToken(n,t,i,r);if(u==="<"&&i+2":u,s=f._matchUntil(n,i+2,r,c),s.unmatchLength!==1||s.matchLength===0)throw new System.ArgumentException("Unrecognized grouping construct.");if(l=s.match.slice(0,1),"`~@#$%^&*()+{}[]|\\/|'\";:,.?".indexOf(l)>=0)throw new System.ArgumentException("Invalid group name: Group names must begin with a word character.");return f._createPatternToken(n,o.groupConstructName,i,2+s.matchLength+1)}if(e=f._matchChars(n,i+1,r,"imnsx-"),e.matchLength>0&&(e.unmatchCh===":"||e.unmatchCh===")"))return a=e.unmatchCh===":"?o.groupConstructImnsx:o.groupConstructImnsxMisc,v=e.unmatchCh===":"?1:0,f._createPatternToken(n,a,i,1+e.matchLength+v);throw new System.ArgumentException("Unrecognized grouping construct.");},_parseQuantifierToken:function(n,t,i){var f=System.Text.RegularExpressions.RegexEngineParser,s=f.tokenTypes,r=null,e=n[t],u,o,h,c;if(e==="*"||e==="+"||e==="?")r=f._createPatternToken(n,s.quantifier,t,1),r.data={val:e};else if(e==="{"&&(u=f._matchChars(n,t+1,i,f._decSymbols),u.matchLength!==0))if(u.unmatchCh==="}")r=f._createPatternToken(n,s.quantifierN,t,1+u.matchLength+1),r.data={n:parseInt(u.match,10)};else if(u.unmatchCh===","&&(o=f._matchChars(n,u.unmatchIndex+1,i,f._decSymbols),o.unmatchCh==="}"&&(r=f._createPatternToken(n,s.quantifierNM,t,1+u.matchLength+1+o.matchLength+1),r.data={n:parseInt(u.match,10),m:null},o.matchLength!==0&&(r.data.m=parseInt(o.match,10),r.data.n>r.data.m))))throw new System.ArgumentException("Illegal {x,y} with x > y.");return r!=null&&(h=t+r.length,h=r||n[i+1]!=="("||(f=s._parseGroupToken(n,t,i+1,r),f==null))return null;if(f.type===u.commentInline)throw new System.ArgumentException("Alternation conditions cannot be comments.");if(e=f.children,e&&e.length){if(h=e[0],h.type===u.groupConstructName)throw new System.ArgumentException("Alternation conditions do not capture and cannot be named.");if((h.type===u.groupConstruct||h.type===u.groupConstructImnsx)&&(l=s._findFirstGroupWithoutConstructs(e),l!=null&&(l.isEmptyCapturing=!0)),h.type===u.literal)if(o=f.value.slice(1,f.value.length-1),v=o[0]>="0"&&o[0]<="9",v){if(y=s._matchChars(o,0,o.length,s._decSymbols),y.matchLength!==o.length)throw new System.ArgumentException("Malformed Alternation group number: "+o+".");p=parseInt(o,10);c={number:p}}else c={name:o}}return e.length&&(e[0].type===u.groupConstruct||e[0].type===u.groupConstructImnsx)||(h=s._createPatternToken("?:",u.groupConstruct,0,2),e.splice(0,0,h)),a=s._createPatternToken(n,u.alternationGroupCondition,f.index-1,1+f.length,[f],"?",""),c!=null&&(a.data=c),a},_findFirstGroupWithoutConstructs:function(n){for(var f=System.Text.RegularExpressions.RegexEngineParser,u=f.tokenTypes,i=null,t,r=0;r0&&(o.children=u,o.childrenPrefix=f,o.childrenPostfix=e),o},_modifyPatternToken:function(n,t,i,r,u){i!=null&&(n.type=i);(r!=null||u!=null)&&(r!=null&&(n.index=r),u!=null&&(n.length=u),n.value=t.slice(n.index,n.index+n.length))},_updatePatternToken:function(n,t,i,r,u){n.type=t;n.index=i;n.length=r;n.value=u},_matchChars:function(n,t,i,r,u){var f={match:"",matchIndex:-1,matchLength:0,unmatchCh:"",unmatchIndex:-1,unmatchLength:0},e=t,o;for(u!=null&&u>=0&&(i=t+u);et&&(f.match=n.slice(t,e),f.matchIndex=t,f.matchLength=e-t),f},_matchUntil:function(n,t,i,r,u){var f={match:"",matchIndex:-1,matchLength:0,unmatchCh:"",unmatchIndex:-1,unmatchLength:0},e=t,o;for(u!=null&&u>=0&&(i=t+u);e=0){f.unmatchCh=o;f.unmatchIndex=e;f.unmatchLength=1;break}e++}return e>t&&(f.match=n.slice(t,e),f.matchIndex=t,f.matchLength=e-t),f}}});Bridge.define("System.Random",{statics:{MBIG:2147483647,MSEED:161803398,MZ:0},inext:0,inextp:0,seedArray:null,config:{init:function(){this.seedArray=System.Array.init(56,0,System.Int32)}},ctor:function(){System.Random.$ctor1.call(this,System.Int64.clip32(System.Int64((new Date).getTime()).mul(1e4)))},$ctor1:function(n){var e,u,i,o,r,f,t;for(this.$initialize(),o=n===-2147483648?2147483647:Math.abs(n),u=System.Random.MSEED-o|0,this.seedArray[55]=u,i=1,r=1;r<55;r=r+1|0)e=(21*r|0)%55,this.seedArray[e]=i,i=u-i|0,i<0&&(i=i+System.Random.MBIG|0),u=this.seedArray[e];for(f=1;f<5;f=f+1|0)for(t=1;t<56;t=t+1|0)this.seedArray[t]=this.seedArray[t]-this.seedArray[1+(t+30|0)%55|0]|0,this.seedArray[t]<0&&(this.seedArray[t]=this.seedArray[t]+System.Random.MBIG|0);this.inext=0;this.inextp=21;n=1},sample:function(){return this.internalSample()*46566128752457969e-26},internalSample:function(){var n,t=this.inext,i=this.inextp;return(t=t+1|0)>=56&&(t=1),(i=i+1|0)>=56&&(i=1),n=this.seedArray[t]-this.seedArray[i]|0,n===System.Random.MBIG&&(n=n-1|0),n<0&&(n=n+System.Random.MBIG|0),this.seedArray[t]=n,this.inext=t,this.inextp=i,n},next:function(){return this.internalSample()},next$2:function(n,t){if(n>t)throw new System.ArgumentOutOfRangeException("minValue","'minValue' cannot be greater than maxValue.");var i=System.Int64(t).sub(System.Int64(n));return i.lte(System.Int64(2147483647))?Bridge.Int.clip32(this.sample()*System.Int64.toNumber(i))+n|0:System.Int64.clip32(Bridge.Int.clip64(this.getSampleForLargeRange()*System.Int64.toNumber(i)).add(System.Int64(n)))},next$1:function(n){if(n<0)throw new System.ArgumentOutOfRangeException("maxValue","'maxValue' must be greater than zero.");return Bridge.Int.clip32(this.sample()*n)},getSampleForLargeRange:function(){var n=this.internalSample(),i=this.internalSample()%2==0?!0:!1,t;return i&&(n=-n|0),t=n,t+=2147483646,t/4294967293},nextDouble:function(){return this.sample()},nextBytes:function(n){if(n==null)throw new System.ArgumentNullException("buffer");for(var t=0;t +var GanttChartView = DlhSoft.Controls.GanttChartView; +// Query string syntax: ?theme +// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero. +var queryString = window.location.search; +var theme = queryString ? queryString.substr(1) : null; +// Retrieve and store the control element for reference purposes. +var ganttChartViewElement = document.querySelector('#ganttChartView'); +// Prepare data items. +var date = new Date(), year = date.getFullYear(), month = date.getMonth(); +var items = [ + { content: 'Task 1', isExpanded: false, start: new Date() }, + { content: 'Task 1.1', indentation: 1, start: new Date(year, month, 2, 8, 0, 0), finish: new Date(year, month, 4, 16, 0, 0) }, + { content: 'Task 1.2', indentation: 1, start: new Date(year, month, 3, 8, 0, 0), finish: new Date(year, month, 5, 12, 0, 0) }, + { content: 'Task 2', isExpanded: true, start: new Date() }, + { content: 'Task 2.1', indentation: 1, start: new Date(year, month, 2, 8, 0, 0), finish: new Date(year, month, 8, 16, 0, 0), completedFinish: new Date(year, month, 5, 16, 0, 0), assignmentsContent: 'Resource 1, Resource 2 [50%]' }, + { content: 'Task 2.2', indentation: 1, start: new Date() }, + { content: 'Task 2.2.1', indentation: 2, start: new Date(year, month, 11, 8, 0, 0), finish: new Date(year, month, 14, 16, 0, 0), completedFinish: new Date(year, month, 14, 16, 0, 0), assignmentsContent: 'Resource 2' }, + { content: 'Task 2.2.2', indentation: 2, start: new Date(year, month, 12, 12, 0, 0), finish: new Date(year, month, 14, 16, 0, 0), assignmentsContent: 'Resource 2' }, + { content: 'Task 3', indentation: 1, start: new Date(year, month, 15, 16, 0, 0), isMilestone: true }]; +items[3].predecessors = [{ item: items[0], dependencyType: 'SS' }]; +items[7].predecessors = [{ item: items[6], lag: 2 * 60 * 60 * 1000 }]; +items[8].predecessors = [{ item: items[4] }, { item: items[5] }]; +for (var i = 4; i <= 16; i++) + items.push({ content: 'Task ' + i, indentation: i >= 8 && i % 3 == 2 ? 0 : 1, start: new Date(year, month, 2 + (i <= 8 ? (i - 4) * 3 : i - 8), 8, 0, 0), finish: new Date(year, month, 2 + (i <= 8 ? (i - 4) * 3 + (i > 8 ? 6 : 1) : i - 2), 16, 0, 0) }); +var settings = { currentTime: new Date(year, month, 2, 12, 0, 0) }; +// Setup start and finish columns to support summary item edits. +var columns = DlhSoft.Controls.GanttChartView.getDefaultColumns(items, settings); +columns[1].cellTemplate = function(item) { // Start + return DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase(document, 120, + function() { return item.start; }, // get + function (value) { // set + if (!item.hasChildren) { + ganttChartView.setItemStart(item, value); + ganttChartView.refreshItemNeighbourhood(item); + } else { + item.start = value; + rescheduleChildren(item, value); + } + }, + undefined, undefined, + function() { return item.hasChildren }); // bold +} +columns[2].cellTemplate = function(item) { // Finish + return DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase(document, 120, + function() { return item.finish; }, // get + function(value) { // set + if (!item.hasChildren) { + ganttChartView.setItemFinish(item, value); + ganttChartView.refreshItemNeighbourhood(item); + } else { + item.finish = value; + rescheduleChildren(item, value); + } + }, + undefined, + function() { return !item.isMilestone; }, // enabled + function() { return item.hasChildren }); // bold +} +settings.columns = columns; +// Optionally, initialize custom theme and templates (themes.js, templates.js). +initializeGanttChartTheme(settings, theme); +initializeGanttChartTemplates(settings, theme); +// Setup summary template to handle updates (with initializeTaskDraggingThumbs). +var originalSummaryTaskTemplate = settings.summaryTaskTemplate ? settings.summaryTaskTemplate : DlhSoft.Controls.GanttChartView.getDefaultSummaryTaskTemplate(items, ganttChartView, settings); +settings.summaryTaskTemplate = function (item) { + var undefinedType = 'undefined', svgns = 'http://www.w3.org/2000/svg'; + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var barMargin = 4; + var barHeight = settings.itemHeight - 2 * barMargin; + var document = ganttChartView.ownerDocument; + var group = originalSummaryTaskTemplate(item); + var itemLeft = ganttChartView.getChartPosition(item.start); + var itemRight = ganttChartView.getChartPosition(item.finish); + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + var thumb = document.createElementNS(svgns, 'rect'); + thumb.setAttribute('x', itemLeft); + thumb.setAttribute('y', barMargin); + thumb.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + thumb.setAttribute('height', barHeight); + thumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + if (!settings.isTaskStartReadOnly) + group.appendChild(thumb); + var startThumb = document.createElementNS(svgns, 'rect'); + startThumb.setAttribute('x', itemLeft - 4); + startThumb.setAttribute('y', barMargin); + startThumb.setAttribute('width', 4); + startThumb.setAttribute('height', barHeight); + startThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: w-resize'); + if (settings.isDraggingTaskStartEndsEnabled && !settings.isTaskStartReadOnly && settings.interaction != 'TouchEnabled') + group.appendChild(startThumb); + var finishThumb = document.createElementNS(svgns, 'rect'); + finishThumb.setAttribute('x', itemRight - 4); + finishThumb.setAttribute('y', barMargin); + finishThumb.setAttribute('width', 8); + finishThumb.setAttribute('height', barHeight); + finishThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: e-resize'); + if (!settings.isTaskEffortReadOnly && settings.interaction != 'TouchEnabled') + group.appendChild(finishThumb); + ganttChartView.initializeTaskDraggingThumbs(thumb, startThumb, finishThumb, undefined, item, itemLeft, itemRight, undefined); + } + return group; +}; +// Summary update handling. +settings.itemPropertyChangeHandler = function(item, propertyName, isDirect) { + if (!ganttChartView || !item.hasChildren || (propertyName != 'start' && propertyName != 'finish') || !isDirect) + return; + if (updatedSummaryItem && item != updatedSummaryItem) { + processSummaryUpdates(); + } + updatedSummaryItem = item; + if (processSummaryUpdatesTimer) + clearTimeout(processSummaryUpdatesTimer); + processSummaryUpdatesTimer = setTimeout(processSummaryUpdates); +} +var updatedSummaryItem = null, processSummaryUpdatesTimer; +function processSummaryUpdates() { + rescheduleChildren(updatedSummaryItem); + updatedSummaryItem = null; +} +// Summary update algorithm. +function rescheduleChildren(summaryItem) { + var items = getLeafItems(summaryItem), start = summaryItem.start, finish = summaryItem.finish; + var minFinish = ganttChartView.getFinish(start, 60 * 1000); + if (finish < minFinish) + finish = minFinish; + var duration = ganttChartView.getEffort(start, finish); + var originalStart = null, originalFinish = null; + items.forEach(function(item) { + if (!originalStart || item.start < originalStart) + originalStart = item.start; + if (!originalFinish || item.finish > originalFinish) + originalFinish = item.finish; + }); + var originalDuration = ganttChartView.getEffort(originalStart, originalFinish); + var increase = duration / originalDuration; + items.forEach(function(item) { + var originalItemStartPosition = ganttChartView.getEffort(originalStart, item.start); + var originalItemFinishPosition = ganttChartView.getEffort(item.finish, originalFinish); + var originalItemCompletion = ganttChartView.getItemCompletion(item); + var updatedItemStart = ganttChartView.getFinish(start, originalItemStartPosition * increase); + var updatedItemFinish = ganttChartView.getStart(originalItemFinishPosition * increase, finish); + ganttChartView.setItemStart(item, updatedItemStart); + ganttChartView.setItemFinish(item, updatedItemFinish); + ganttChartView.setItemCompletion(item, originalItemCompletion); + ganttChartView.refreshItemNeighbourhood(item); + }); +} +function getLeafItems(summaryItem) { + var leafItems = []; + summaryItem.children.forEach(function(item) { + if (!item.hasChildren) { leafItems.push(item); } + else { getLeafItems(item).forEach(function(child) { leafItems.push(child); }); } + }); + return leafItems; +} +// Initialize the component. +var ganttChartView = DlhSoft.Controls.GanttChartView.initialize(ganttChartViewElement, items, settings); \ No newline at end of file diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/index.html b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/index.html new file mode 100644 index 000000000..5e296c511 --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/index.html @@ -0,0 +1,16 @@ + + + + GanttChartView Work Optimizations Sample + + + + + + + + + +
...
+ + diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/templates.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/templates.js new file mode 100644 index 000000000..8c6a87b2d --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/templates.js @@ -0,0 +1,643 @@ +// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero. +function initializeGanttChartTemplates(settings, theme) { + if (theme == 'Default' || theme == 'Aero') + return; + // Override settings (partial). + var barMargin = 4; + var barHeight = settings.itemHeight - 2 * barMargin; + var completedBarMargin = 1; + var completedBarHeight = barHeight - 2 * completedBarMargin; + // Common helpers. + var undefinedType = 'undefined', svgns = 'http://www.w3.org/2000/svg', hourDuration = 60 * 60 * 1000; + function getChartItemArea(item) { + var document = item.ganttChartView.ownerDocument; + if (typeof item.chartItemArea === undefinedType) + item.chartItemArea = document.createElementNS(svgns, 'g'); + for (var i = item.chartItemArea.childNodes.length; i-- > 0;) + item.chartItemArea.removeChild(item.chartItemArea.childNodes[i]); + return item.chartItemArea; + } + function getTextNode(document, value) { + var span = document.createElement('span'); + span.innerHTML = value; + return span; + }; + function getDependencyTypeString(dependencyType) { + switch (dependencyType) { + case 'StartStart': + case 'SS': + return 'SS'; + case 'FinishFinish': + case 'FF': + return 'FF'; + case 'StartFinish': + case 'SF': + return 'SF'; + case 'FinishStart': + case 'FS': + default: + return 'FS'; + } + }; + // Template definitions. + settings.styleDefinitionTemplate = function (ganttChartView) { + var document = ganttChartView.ownerDocument; + var defs = document.createElementNS(svgns, 'defs'); + var arrowMarker = document.createElementNS(svgns, 'marker'); + arrowMarker.setAttribute('id', 'ArrowMarker'); + arrowMarker.setAttribute('viewBox', '0 0 9 9'); + arrowMarker.setAttribute('refX', '0'); + arrowMarker.setAttribute('refY', '4.5'); + arrowMarker.setAttribute('markerUnits', 'strokeWidth'); + arrowMarker.setAttribute('markerWidth', 4.5 * (settings.arrowSize ? settings.arrowSize : 1)); + arrowMarker.setAttribute('markerHeight', 3.5 * (settings.arrowSize ? settings.arrowSize : 1)); + arrowMarker.setAttribute('orient', 'auto'); + var arrowPath = document.createElementNS(svgns, 'path'); + arrowPath.setAttribute('fill', settings.arrowFill ? settings.arrowFill : '#3b87d9'); + arrowPath.setAttribute('d', 'M 0 0 L 9 4.5 L 0 9 z'); + arrowMarker.appendChild(arrowPath); + defs.appendChild(arrowMarker); + return defs; + }; + settings.standardTaskTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + var group = getChartItemArea(item); + if (settings.isBaselineVisible && typeof item.baselineStart !== undefinedType && typeof item.baselineFinish !== undefinedType) { + var itemBaselineLeft = ganttChartView.getChartPosition(item.baselineStart); + var itemBaselineRight = Math.max(ganttChartView.getChartPosition(item.baselineFinish), itemBaselineLeft + 4); + var baselineBar = document.createElementNS(svgns, 'rect'); + baselineBar.setAttribute('x', itemBaselineLeft); + baselineBar.setAttribute('y', barMargin / 2); + baselineBar.setAttribute('width', Math.max(0, itemBaselineRight - itemBaselineLeft - 1)); + baselineBar.setAttribute('height', barHeight); + baselineBar.setAttribute('rx', settings.barCornerRadius); + baselineBar.setAttribute('ry', settings.barCornerRadius); + var baselineBarClass = settings.baselineBarClass; + if (typeof item.baselineBarClass !== undefinedType) + baselineBarClass = item.baselineBarClass; + if (typeof baselineBarClass !== undefinedType) + baselineBar.setAttribute('class', baselineBarClass); + else { + var baselineBarStyle = settings.baselineBarStyle; + if (typeof item.baselineBarStyle !== undefinedType) + baselineBarStyle = item.baselineBarStyle; + if (typeof baselineBarStyle !== undefinedType) + baselineBar.setAttribute('style', baselineBarStyle); + } + group.appendChild(baselineBar); + } + var itemLeft = ganttChartView.getChartPosition(item.start); + var itemRight = Math.max(ganttChartView.getChartPosition(item.finish), itemLeft + 4); + var itemCompletedRight = ganttChartView.getChartPosition(item.completedFinish) + 1; + var bar = document.createElementNS(svgns, 'rect'); + bar.setAttribute('x', itemLeft); + bar.setAttribute('y', barMargin); + bar.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + bar.setAttribute('height', barHeight); + bar.setAttribute('rx', settings.barCornerRadius); + bar.setAttribute('ry', settings.barCornerRadius); + var barClass = settings.standardBarClass; + if (typeof item.standardBarClass !== undefinedType) + barClass = item.standardBarClass; + if (typeof item.barClass !== undefinedType) + barClass = item.barClass; + if (typeof barClass !== undefinedType) + bar.setAttribute('class', barClass); + else { + var barStyle = settings.standardBarStyle; + if (typeof item.standardBarStyle !== undefinedType) + barStyle = item.standardBarStyle; + if (typeof item.barStyle !== undefinedType) + barStyle = item.barStyle; + if (typeof barStyle !== undefinedType) + bar.setAttribute('style', barStyle); + } + group.appendChild(bar); + if (settings.isTaskCompletedEffortVisible) { + var completedBar = document.createElementNS(svgns, 'rect'); + completedBar.setAttribute('x', itemLeft + 1); + completedBar.setAttribute('y', barMargin + completedBarMargin); + completedBar.setAttribute('width', Math.max(0, itemCompletedRight - 2 - 1 - itemLeft - 1)); + completedBar.setAttribute('height', completedBarHeight); + completedBar.setAttribute('rx', settings.completedBarCornerRadius); + completedBar.setAttribute('ry', settings.completedBarCornerRadius); + var completedBarClass = settings.standardCompletedBarClass; + if (typeof item.standardCompletedBarClass !== undefinedType) + completedBarClass = item.standardCompletedBarClass; + if (typeof item.completedBarClass !== undefinedType) + completedBarClass = item.completedBarClass; + if (typeof completedBarClass !== undefinedType) + completedBar.setAttribute('class', completedBarClass); + else { + var completedBarStyle = settings.standardCompletedBarStyle; + if (typeof item.standardCompletedBarStyle !== undefinedType) + completedBarStyle = item.standardCompletedBarStyle; + if (typeof item.completedBarStyle !== undefinedType) + completedBarStyle = item.completedBarStyle; + if (typeof completedBarStyle !== undefinedType) + completedBar.setAttribute('style', completedBarStyle); + } + group.appendChild(completedBar); + } + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + var thumb = document.createElementNS(svgns, 'rect'); + thumb.setAttribute('x', itemLeft); + thumb.setAttribute('y', barMargin); + thumb.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + thumb.setAttribute('height', barHeight); + thumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + if (!settings.isTaskStartReadOnly) + group.appendChild(thumb); + var startThumb = document.createElementNS(svgns, 'rect'); + startThumb.setAttribute('x', itemLeft - 4); + startThumb.setAttribute('y', barMargin); + startThumb.setAttribute('width', 4); + startThumb.setAttribute('height', barHeight); + startThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: w-resize'); + if (settings.isDraggingTaskStartEndsEnabled && !settings.isTaskStartReadOnly && settings.interaction != 'TouchEnabled') + group.appendChild(startThumb); + var finishThumb = document.createElementNS(svgns, 'rect'); + finishThumb.setAttribute('x', itemRight - 4); + finishThumb.setAttribute('y', barMargin); + finishThumb.setAttribute('width', 8); + finishThumb.setAttribute('height', barHeight); + finishThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: e-resize'); + if (!settings.isTaskEffortReadOnly && settings.interaction != 'TouchEnabled') + group.appendChild(finishThumb); + var completedFinishThumb = document.createElementNS(svgns, 'rect'); + completedFinishThumb.setAttribute('x', itemCompletedRight - 2); + completedFinishThumb.setAttribute('y', barMargin); + completedFinishThumb.setAttribute('width', 6); + completedFinishThumb.setAttribute('height', barHeight); + completedFinishThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: ew-resize'); + if (!settings.isTaskCompletionReadOnly && settings.isTaskCompletedEffortVisible && settings.interaction != 'TouchEnabled') { + group.appendChild(completedFinishThumb); + var completedFinishToolTip = document.createElementNS(svgns, 'title'); + var completion = typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified ? ganttChartView.getItemCompletion(item) : NaN; + completedFinishToolTip.appendChild(getTextNode(document, !isNaN(completion) ? (Math.round(completion * 100 * 100) / 100) + '%' : '')); + completedFinishThumb.appendChild(completedFinishToolTip); + } + ganttChartView.initializeTaskDraggingThumbs(thumb, startThumb, finishThumb, completedFinishThumb, item, itemLeft, itemRight, itemCompletedRight); + if (settings.areTaskDependenciesVisible && !settings.areTaskPredecessorsReadOnly && !item.isPart) { + var startDependencyThumb = null; + if (typeof settings.allowCreatingStartDependencies === undefinedType || settings.allowCreatingStartDependencies) { + startDependencyThumb = document.createElementNS(svgns, 'circle'); + startDependencyThumb.setAttribute('cx', itemLeft); + startDependencyThumb.setAttribute('cy', barMargin + barHeight / 2); + startDependencyThumb.setAttribute('r', barHeight / 4); + startDependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(startDependencyThumb); + } + var dependencyThumb = document.createElementNS(svgns, 'circle'); + dependencyThumb.setAttribute('cx', itemRight - 2); + dependencyThumb.setAttribute('cy', barMargin + barHeight / 2); + dependencyThumb.setAttribute('r', barHeight / 4); + dependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(dependencyThumb); + ganttChartView.initializeDependencyDraggingThumbs(dependencyThumb, startDependencyThumb, group, item, barMargin + barHeight / 2, itemRight - 2, itemLeft); + } + } + return group; + }; + settings.summaryTaskTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + var group = getChartItemArea(item); + var itemLeft = ganttChartView.getChartPosition(item.start); + var itemRight = ganttChartView.getChartPosition(item.finish); + var height = settings.barHeight * 2.15 / 2.65; + var bar = document.createElementNS(svgns, 'rect'); + bar.setAttribute('x', itemLeft); + bar.setAttribute('y', settings.barMargin); + bar.setAttribute('width', Math.max(0, itemRight - itemLeft - 1)); + bar.setAttribute('height', height); + var barClass = settings.summaryBarClass; + if (typeof item.summaryBarClass !== undefinedType) + barClass = item.summaryBarClass; + if (typeof item.barClass !== undefinedType) + barClass = item.barClass; + if (typeof barClass !== undefinedType) + bar.setAttribute('class', barClass); + else { + var barStyle = settings.summaryBarStyle; + if (typeof item.summaryBarStyle !== undefinedType) + barStyle = item.summaryBarStyle; + if (typeof item.barStyle !== undefinedType) + barStyle = item.barStyle; + if (typeof barStyle !== undefinedType) + bar.setAttribute('style', barStyle); + } + group.appendChild(bar); + if (!item.isExpanded) { + var line = document.createElementNS(svgns, 'line'); + line.setAttribute('x1', itemLeft); + line.setAttribute('y1', settings.barMargin + height + 2.5); + line.setAttribute('x2', itemRight - 1); + line.setAttribute('y2', settings.barMargin + height + 2.5); + var lineClass = settings.collapsedSummaryLineClass; + if (typeof item.collapsedSummaryLineClass !== undefinedType) + lineClass = item.collapsedSummaryLineClass; + if (typeof lineClass !== undefinedType) + line.setAttribute('class', lineClass); + else { + var lineStyle = settings.collapsedSummaryLineStyle; + if (typeof item.collapsedSummaryLineStyle !== undefinedType) + lineStyle = item.collapsedSummaryLineStyle; + if (typeof lineStyle !== undefinedType) + line.setAttribute('style', lineStyle); + } + group.appendChild(line); + } + var startTriangle = document.createElementNS(svgns, 'polygon'), x; + var y = settings.barMargin - 0.25, h = height + 1.5, tw = settings.barHeight * 3 / 4, teh = settings.barHeight / 4; + x = itemLeft - 1 - settings.barHeight / 3; + startTriangle.setAttribute('points', x + ',' + y + ' ' + x + ',' + (y + h) + ' ' + (x + tw / 2) + ',' + (y + h + teh) + ' ' + (x + tw) + ',' + (y + h) + ' ' + (x + tw) + ',' + y); + if (typeof barClass !== undefinedType) + startTriangle.setAttribute('class', barClass); + if (typeof barStyle !== undefinedType) + startTriangle.setAttribute('style', barStyle); + group.appendChild(startTriangle); + var endTriangle = document.createElementNS(svgns, 'polygon'); + x = itemRight + settings.barHeight / 3; + endTriangle.setAttribute('points', x + ',' + y + ' ' + x + ',' + (y + h) + ' ' + (x - tw / 2) + ',' + (y + h + teh) + ' ' + (x - tw) + ',' + (y + h) + ' ' + (x - tw) + ',' + y); + if (typeof barClass !== undefinedType) + endTriangle.setAttribute('class', barClass); + if (typeof barStyle !== undefinedType) + endTriangle.setAttribute('style', barStyle); + group.appendChild(endTriangle); + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + if (settings.areTaskDependenciesVisible && !settings.areTaskPredecessorsReadOnly && !item.isPart) { + var startDependencyThumb = null; + if (typeof settings.allowCreatingStartDependencies === undefinedType || settings.allowCreatingStartDependencies) { + startDependencyThumb = document.createElementNS(svgns, 'circle'); + startDependencyThumb.setAttribute('cx', itemLeft - 0.5); + startDependencyThumb.setAttribute('cy', settings.barMargin + settings.barHeight / 2); + startDependencyThumb.setAttribute('r', settings.barHeight / 4); + startDependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(startDependencyThumb); + } + var dependencyThumb = document.createElementNS(svgns, 'circle'); + dependencyThumb.setAttribute('cx', itemRight - 0.5); + dependencyThumb.setAttribute('cy', settings.barMargin + settings.barHeight / 2); + dependencyThumb.setAttribute('r', 2.5); + dependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(dependencyThumb); + ganttChartView.initializeDependencyDraggingThumbs(dependencyThumb, startDependencyThumb, group, item, settings.barMargin + settings.barHeight / 2, itemRight - 1.5, itemLeft); + } + } + return group; + }; + settings.milestoneTaskTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + var group = getChartItemArea(item); + if (settings.isBaselineVisible && typeof item.baselineStart !== undefinedType) { + var itemBaselineLeft = ganttChartView.getChartPosition(item.baselineStart); + var baselineStartDiamond = document.createElementNS(svgns, 'polygon'); + var xb = itemBaselineLeft, yb = settings.barMargin - 1, hb = settings.barHeight + 1; + baselineStartDiamond.setAttribute('points', xb + ',' + yb + ' ' + (xb - hb / 2) + ',' + (yb + hb / 2) + ' ' + xb + ',' + (yb + hb) + ' ' + (xb + hb / 2) + ',' + (yb + hb / 2)); + var baselineBarClass = settings.baselineBarClass; + if (typeof item.baselineBarClass !== undefinedType) + baselineBarClass = item.baselineBarClass; + if (typeof baselineBarClass !== undefinedType) + baselineStartDiamond.setAttribute('class', baselineBarClass); + else { + var baselineBarStyle = settings.baselineBarStyle; + if (typeof item.baselineBarStyle !== undefinedType) + baselineBarStyle = item.baselineBarStyle; + } + baselineStartDiamond.setAttribute('style', baselineBarStyle); + group.appendChild(baselineStartDiamond); + } + var itemLeft = ganttChartView.getChartPosition(item.start); + var startDiamond = document.createElementNS(svgns, 'polygon'); + var x = itemLeft - 1, y = settings.barMargin, h = settings.barHeight + 1; + startDiamond.setAttribute('points', x + ',' + y + ' ' + (x - h / 2) + ',' + (y + h / 2) + ' ' + x + ',' + (y + h) + ' ' + (x + h / 2) + ',' + (y + h / 2)); + var barClass = settings.milestoneBarClass; + if (typeof item.milestoneBarClass !== undefinedType) + barClass = item.milestoneBarClass; + if (typeof item.barClass !== undefinedType) + barClass = item.barClass; + if (typeof barClass !== undefinedType) + startDiamond.setAttribute('class', barClass); + else { + var barStyle = settings.milestoneBarStyle; + if (typeof item.milestoneBarStyle !== undefinedType) + barStyle = item.milestoneBarStyle; + if (typeof item.barStyle !== undefinedType) + barStyle = item.barStyle; + if (typeof barStyle !== undefinedType) + startDiamond.setAttribute('style', barStyle); + } + group.appendChild(startDiamond); + if (!settings.isReadOnly && !settings.isChartReadOnly && (typeof item.isReadOnly === undefinedType || !item.isReadOnly) && (typeof item.isBarReadOnly === undefinedType || !item.isBarReadOnly)) { + var thumb = document.createElementNS(svgns, 'rect'); + thumb.setAttribute('x', x - h / 2); + thumb.setAttribute('y', settings.barMargin); + thumb.setAttribute('width', h); + thumb.setAttribute('height', h); + thumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(thumb); + ganttChartView.initializeTaskDraggingThumbs(thumb, null, null, null, item, x, x, x); + if (settings.areTaskDependenciesVisible && !settings.areTaskPredecessorsReadOnly && !item.isPart) { + var dependencyThumb = document.createElementNS(svgns, 'circle'); + dependencyThumb.setAttribute('cx', x); + dependencyThumb.setAttribute('cy', settings.barMargin + settings.barHeight / 2); + dependencyThumb.setAttribute('r', settings.barHeight / 4); + dependencyThumb.setAttribute('style', 'fill: White; fill-opacity: 0; cursor: pointer'); + group.appendChild(dependencyThumb); + ganttChartView.initializeDependencyDraggingThumbs(dependencyThumb, null, group, item, settings.barMargin + settings.barHeight / 2, x, x); + } + } + return group; + }; + settings.dependencyLineTemplate = function (item, predecessorItem) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var items = ganttChartView.items; + var document = ganttChartView.ownerDocument; + function getDependencyLinePathData(item, predecessorItem) { + var y = ganttChartView.getItemTop(predecessorItem.item); + var y1 = ganttChartView.getItemTop(item); + var d = 'M ', x, x1, x2, y, h = settings.itemHeight, h2 = h / 2, extraLineLength = h / 3.5, arrowSpace = 3.5, horizontal = false, x0; + if (y == y1 && (typeof predecessorItem.dependencyType === undefinedType || predecessorItem.dependencyType == 'FinishStart' || predecessorItem.dependencyType == 'FS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + if (typeof predecessorItem.dependencyType === undefinedType || predecessorItem.dependencyType == 'FinishStart' || predecessorItem.dependencyType == 'FS') { + x = ganttChartView.getChartPosition(predecessorItem.item.finish); + x1 = ganttChartView.getChartPosition(item.start); + } + else { + x = ganttChartView.getChartPosition(predecessorItem.item.start); + x1 = ganttChartView.getChartPosition(item.finish); + } + y = y - y1 + 0.5; + d += x + ' ' + (y + h2) + ' L ' + (x1 + (x1 > x ? -1 : +1) * (h / 5 - 1)) + ' ' + (y + h2); + } + else { + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + x = ganttChartView.getChartPosition(predecessorItem.item.start); + if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))) + x -= settings.barMargin * 5 / 8 + 0.25; + else if (predecessorItem.item.isMilestone) + x -= h / 4; + x1 = x - extraLineLength; + } + else { + x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1; + if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)) + x += settings.barMargin * 5 / 8 + 0.25; + else if (predecessorItem.item.isMilestone) + x += h / 4; + else { + x0 = ganttChartView.getChartPosition(predecessorItem.item.start) + 4 - 1; + if (x < x0) + x = x0; + } + x1 = x + extraLineLength; + } + y = y - y1; + d += x + ' ' + (y + h2) + ' L ' + x1 + ' ' + (y + h2); + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + x = ganttChartView.getChartPosition(item.finish) - 1; + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) { + horizontal = true; + if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled)) + x += settings.barMargin * 5 / 8 + 1; + else if (item.isMilestone) + x += h / 4 + 1; + else { + x0 = ganttChartView.getChartPosition(item.start) + 4 - 1; + if (x < x0) + x = x0; + } + x2 = x + extraLineLength; + } + else { + if (item.isMilestone) + x2 = x; + else { + x0 = ganttChartView.getChartPosition(item.start) + 4; + if (x < x0) + x = x0; + x2 = x - 2.5; + } + } + } + else { + x = ganttChartView.getChartPosition(item.start); + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) { + horizontal = true; + if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled)) + x -= settings.barMargin * 5 / 8 + 1; + else if (item.isMilestone) + x -= h / 4 + 1; + x2 = x - extraLineLength; + } + else { + if (item.isMilestone) + x2 = x - 1; + else { + x2 = x + 1.5; + var xf = ganttChartView.getChartPosition(item.finish); + if (x2 < x1 && xf - x1 > extraLineLength * 2 && item.start >= predecessorItem.item.finish) + x2 = x1; + } + } + } + if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) { + if (x2 > x1) { + y -= extraLineLength / 6; + if (y <= 0) + y += h2; + else + y -= h2 - 2.5; + d += ' ' + x1 + ' ' + (y + h2); + } + d += ' ' + x2 + ' ' + (y + h2); + } + else { + if (x2 < x1) { + y -= extraLineLength / 6; + if (y <= 0) + y += h2; + else + y -= h2 - 2.5; + d += ' ' + x1 + ' ' + (y + h2); + } + d += ' ' + x2 + ' ' + (y + h2); + } + if (horizontal) + y = h2 + 0.5; + else if (y <= 0) + y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace; + else + y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace; + if (horizontal) { + if (x2 > x - arrowSpace) + arrowSpace = -arrowSpace; + x -= arrowSpace; + } + d += ' ' + x2 + ' ' + y; + if (horizontal) + d += ' ' + x + ' ' + y; + } + return d; + } + var group = document.createElementNS(svgns, 'g'); + var data = getDependencyLinePathData(item, predecessorItem); + var polylineZone = document.createElementNS(svgns, 'path'); + polylineZone.setAttribute('d', data); + if (typeof settings.dependencyLineZoneClass !== undefinedType) + polylineZone.setAttribute('class', settings.dependencyLineZoneClass); + if (typeof settings.dependencyLineZoneStyle !== undefinedType) + polylineZone.setAttribute('style', settings.dependencyLineZoneStyle); + group.appendChild(polylineZone); + var polyline = document.createElementNS(svgns, 'path'); + polyline.setAttribute('d', data); + var polylineClass = settings.dependencyLineClass; + if (typeof predecessorItem.dependencyLineClass !== undefinedType) + polylineClass = predecessorItem.dependencyLineClass; + if (typeof polylineClass !== undefinedType) + polyline.setAttribute('class', polylineClass); + else { + var polylineStyle = settings.dependencyLineStyle; + if (typeof predecessorItem.dependencyLineStyle !== undefinedType) + polylineStyle = predecessorItem.dependencyLineStyle; + if (typeof polylineStyle !== undefinedType) + polyline.setAttribute('style', polylineStyle); + } + group.appendChild(polyline); + return group; + }; + settings.assignmentsTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var settings = ganttChartView.settings; + var document = ganttChartView.ownerDocument; + var text = document.createElementNS(svgns, 'text'); + var itemRight = ganttChartView.getChartPosition(item.finish); + if (item.isMilestone || (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))) + itemRight += settings.barHeight / 2; + text.setAttribute('x', itemRight + 7); + text.setAttribute('y', settings.barMargin + settings.barHeight - 1); + var isPhone = settings.target == 'Phone'; + var content = !isPhone ? item.assignmentsContent : item.content; + if (typeof content === undefinedType) + content = ''; + text.appendChild(document.createTextNode(content)); + if (typeof settings.assignmentsClass !== undefinedType) + text.setAttribute('class', settings.assignmentsClass); + else if (typeof settings.assignmentsStyle !== undefinedType) + text.setAttribute('style', settings.assignmentsStyle); + return text; + }; + settings.itemTemplate = function (item) { + var ganttChartView = item.ganttChartView; + var document = item.ganttChartView.ownerDocument; + var toolTip = document.createElementNS(svgns, 'title'); + toolTip.appendChild(getTextNode(document, item.content)); + if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { + if (typeof item.loadChartView === undefinedType) { + if (typeof item.scheduleChartView === undefinedType && item.parent) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Parent: ' + item.parent.content)); + } + if (typeof item.scheduleChartView !== undefinedType && item.scheduleChartItem) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Row: ' + item.scheduleChartItem.content)); + } + if (item.hasChildren) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Children: ' + item.children.length)); + } + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode((!item.isMilestone ? 'Start: ' : '') + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.start)))); + if (!item.isMilestone) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Finish: ' + settings.dateTimeFormatter(ganttChartView.getOutputDate(item.finish)))); + } + if (settings.areTaskAssignmentsVisible && item.assignmentsContent) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Assignments: ' + item.assignmentsContent)); + } + if (!item.isMilestone) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Effort: ' + (ganttChartView.getItemTotalEffort(item) / hourDuration) + 'h')); + if (settings.isTaskCompletedEffortVisible) { + var completion = ganttChartView.getItemCompletion(item); + if (!isNaN(completion)) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Completed: ' + (Math.round(completion * 100 * 100) / 100) + '%')); + } + } + } + if (settings.areTaskDependenciesVisible && item.predecessors && item.predecessors.length > 0) { + toolTip.appendChild(document.createTextNode('\n')); + var predecessorsString = ''; + for (var i = 0; i < item.predecessors.length; i++) { + var predecessor = item.predecessors[i]; + if (!predecessor.item) + continue; + if (predecessorsString.length > 0) + predecessorsString += ', '; + predecessorsString += predecessor.item.content; + if (predecessor.dependencyType) + predecessorsString += ' (' + getDependencyTypeString(predecessor.dependencyType) + ')'; + } + toolTip.appendChild(document.createTextNode('Predecessors: ' + predecessorsString)); + } + } + else if (!isNaN(item.units)) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(document.createTextNode('Allocation: ' + (Math.round(item.units * 100 * 100) / 100) + '%')); + } + } + return toolTip; + }; + settings.predecessorItemTemplate = function (item, predecessorItem) { + var document = item.ganttChartView.ownerDocument; + var toolTip = document.createElementNS(svgns, 'title'); + toolTip.appendChild(getTextNode(document, predecessorItem.item.content + ' - ' + item.content)); + if (typeof settings.areToolTipsSimplified === undefinedType || !settings.areToolTipsSimplified) { + if (predecessorItem.dependencyType) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Type: ' + getDependencyTypeString(predecessorItem.dependencyType))); + } + if (predecessorItem.lag) { + toolTip.appendChild(document.createTextNode('\n')); + toolTip.appendChild(getTextNode(document, 'Lag: ' + (predecessorItem.lag / hourDuration) + 'h')); + } + } + return toolTip; + }; +} +function initializePertChartTemplates(settings, theme) { + if (theme == 'Default') + return; + // Common helpers. + var svgns = 'http://www.w3.org/2000/svg'; + // Template definitions. + settings.styleDefinitionTemplate = function () { + var defs = document.createElementNS(svgns, 'defs'); + var arrowMarker = document.createElementNS(svgns, 'marker'); + arrowMarker.setAttribute('id', 'PertArrowMarker'); + arrowMarker.setAttribute("viewBox", "0 0 10 10"); + arrowMarker.setAttribute("refX", "0"); + arrowMarker.setAttribute("refY", "5"); + arrowMarker.setAttribute("markerUnits", "strokeWidth"); + arrowMarker.setAttribute("markerWidth", "5"); + arrowMarker.setAttribute("markerHeight", "4"); + arrowMarker.setAttribute("orient", "auto"); + var arrowPath = document.createElementNS(svgns, "path"); + arrowPath.setAttribute("fill", settings.arrowFill ? settings.arrowFill : '#3b87d9'); + arrowPath.setAttribute("d", "M 0 0 L 10 5 L 0 10 z"); + arrowMarker.appendChild(arrowPath); + defs.appendChild(arrowMarker); + return defs; + }; +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/themes.js b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/themes.js new file mode 100644 index 000000000..d46f56e8e --- /dev/null +++ b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/SummaryUpdating/themes.js @@ -0,0 +1,207 @@ +// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero. +function initializeGanttChartTheme(settings, theme) { + if (theme == 'Default') + return; + if (theme == 'Aero') { + settings.theme = 'Aero'; + return; + } + settings.headerHeight = 31 * 2; // 2 scale rows + settings.itemHeight = 28; + settings.barCornerRadius = 1; + settings.completedBarCornerRadius = 1; + settings.arrowSize = 2; + settings.hourWidth = 5; + switch (theme) { + case 'Generic-bright': + settings.headerBackground = 'white'; + settings.mainStroke = '#005c9e'; + settings.mainFill = 'white'; + settings.accentFill = '#005c9e'; + settings.diamondFill = '#e31d3b'; + settings.diamondStroke = '#005c9e'; + break; + case 'Generic-blue': + settings.headerBackground = 'white'; + break; + case 'Purple-green': + settings.headerBackground = '#dddfd4'; + settings.mainStroke = '#005173'; + settings.mainFill = '#a0729d'; + settings.accentFill = '#91bc0e'; + break; + case 'Blue-navy': + settings.headerBackground = '#eeeeee'; + settings.selectedGridBackground = '#e8e8e8'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#369bf9'; + settings.accentFill = '#227fd5'; + settings.alternativeGridBackground = '#f9f9f9'; + break; + case 'Orange-brown': + settings.headerBackground = '#eeeeee'; + settings.selectedGridBackground = '#e8e8e8'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#ffbf5a'; + settings.accentFill = '#d5a05a'; + settings.diamondFill = '#a91923'; + settings.diamondStroke = '#222222'; + settings.alternativeBackground = '#f9f9f9'; + break; + case 'Teal-green': + settings.headerBackground = '#eeeeee'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#5ebcbb'; + settings.accentFill = '#3294a1'; + settings.diamondFill = '#4c7f3d'; + settings.diamondStroke = '#222222'; + break; + case 'Steel-blue': + settings.border = '#aaaaaa'; + settings.headerBackground = '#4b5d6b'; + settings.headerForeground = 'white'; + settings.headerBorder = '#aaaaaa'; + settings.containerBackground = '#a5b5c2'; + settings.chartBackground = '#bfcfda'; + settings.gridForeground = 'gray'; + settings.toggleFill = 'gray'; + settings.selectedGridForeground = '#4b5d6b'; + settings.selectedGridBackground = '#95a5b2'; + settings.nonworkingBackground = '#95a5b2'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#6699cc'; + settings.accentFill = '#4c7f3d'; + settings.diamondFill = '#4b5d6b'; + settings.diamondStroke = '#222222'; + break; + case 'Cyan-green': + settings.headerBackground = '#dddddd'; + settings.mainStroke = '#6534ff'; + settings.mainFill = '#1fb5ce'; + settings.accentFill = '#1fce43'; + settings.diamondFill = '#d6485b'; + settings.diamondStroke = '#222222'; + break; + case 'Purple-beige': + settings.selectedGridBackground = '#bfb8a4'; + settings.mainStroke = '#005c9e'; + settings.mainFill = '#a68b99'; + settings.accentFill = '#bfb8a4'; + settings.diamondFill = '#bfb8a4'; + settings.diamondStroke = '#005c9e'; + settings.alternativeGridBackground = '#f0eeeb'; + settings.alternativeChartBackground = '#f9f9f9'; + break; + case 'Dark-black': + settings.containerClass = 'dark'; // CSS class for dynamically generated elements, e.g. input (app.css) + settings.border = '#222222'; + settings.headerBackground = '#111111'; + settings.headerForeground = '#eeeeee'; + settings.headerBorder = '#222222'; + settings.containerBackground = '#222222'; + settings.gridForeground = '#dddddd'; + settings.chartForeground = '#dddddd'; + settings.scaleSeparatorBorder = '#505050'; + settings.toggleFill = '#808080'; + settings.toggleHoveringFill = 'white'; + settings.selectedGridForeground = 'white'; + settings.selectedGridBackground = '#404040'; + settings.nonworkingBackground = '#333333'; + settings.mainStroke = 'gray'; + settings.accentFill = '#ffbb00'; + settings.summaryFill = '#505050'; + settings.diamondFill = '#ffbb00'; + settings.currentTimeStroke = '#289451'; + break; + case 'Gray-blue': + settings.headerBackground = 'white'; + settings.containerBackground = '#f0f0f0'; + settings.selectedGridBackground = 'white'; + settings.mainStroke = '#005c9e'; + settings.mainFill = 'white'; + settings.accentFill = '#0087be'; + settings.diamondFill = '#607080'; + settings.diamondStroke = '#005c9e'; + break; + case 'DlhSoft-gray': + settings.border = '#aaaaaa'; + settings.headerBackground = '#e31d3b'; + settings.headerForeground = 'white'; + settings.headerBorder = 'transparent'; + settings.selectedGridBackground = '#e8e8e8'; + settings.mainStroke = '#666'; + settings.mainFill = '#f0f0f0'; + settings.accentFill = '#ad927f'; + settings.summaryFill = '#666'; + settings.diamondFill = '#82a0b3'; + settings.diamondStroke = '#666'; + settings.alternativeGridBackground = '#f8f8f8'; + settings.currentTimeStroke = '#82a0b3'; + break; + } + if (settings.containerBackground) + settings.containerStyle = 'background-color: ' + settings.containerBackground; + if (settings.headerForeground) + settings.columnHeaderStyle = 'color: ' + settings.headerForeground; + if (settings.gridForeground) { + settings.itemStyle = 'color: ' + settings.gridForeground + (settings.gridBackground ? '; background-color: ' + settings.gridBackground : ''); + if (settings.selectedGridForeground) + settings.selectedItemStyle = 'color: ' + settings.selectedGridForeground + '; background-color: ' + (settings.selectedGridBackground ? settings.selectedGridBackground : settings.gridForeground); + } + else { + if (settings.selectedGridForeground || settings.selectedGridBackground) + settings.selectedItemStyle = 'color: ' + (settings.selectedGridForeground ? settings.selectedGridForeground : 'black') + '; background-color: ' + (settings.selectedGridBackground ? settings.selectedGridBackground : '#f0f0f0'); + } + if (settings.toggleFill) + settings.toggleButtonStyle = 'fill: ' + settings.toggleFill; + if (settings.toggleHoveringFill) + settings.toggleButtonHoveringStyle = 'fill: ' + settings.toggleHoveringFill; + settings.scales = [{ scaleType: 'NonworkingTime', isHeaderVisible: false, isHighlightingVisible: true, highlightingStyle: 'stroke-width: 0; fill: ' + (settings.nonworkingBackground ? settings.nonworkingBackground : '#f8f8f8') + '; fill-opacity: 0.65' }, + { scaleType: 'Weeks', headerTextFormat: 'Date', headerStyle: 'padding: 7px 5px; border-right: 1px solid ' + (settings.headerBorder ? settings.headerBorder : '#e8e8e8') + '; border-bottom: 1px solid ' + (settings.headerBorder ? settings.headerBorder : '#e8e8e8') + (settings.headerForeground ? '; color: ' + settings.headerForeground : ''), isSeparatorVisible: true, separatorStyle: 'stroke: ' + (settings.scaleSeparatorBorder ? settings.scaleSeparatorBorder : '#c8bfe7') + '; stroke-width: 0.5px' }, + { scaleType: 'Days', headerTextFormat: 'DayOfWeekAbbreviation', headerStyle: 'padding: 7px 5px; border-right: 1px solid ' + (settings.headerBorder ? settings.headerBorder : '#e8e8e8') + (settings.headerForeground ? '; color: ' + settings.headerForeground : '') }, + { scaleType: 'CurrentTime', isHeaderVisible: false, isSeparatorVisible: true, separatorStyle: 'stroke: ' + (settings.currentTimeStroke ? settings.currentTimeStroke : '#e31d3b') + '; stroke-width: 0.5px' }]; + if (settings.chartBackground) + settings.scales.splice(0, 0, { scaleType: 'Custom', isHeaderVisible: false, intervals: [{ start: new Date(1, 0, 1), finish: new Date(10000, 11, 31, 23, 59, 59, 999) }], isHighlightingVisible: true, highlightingStyle: 'fill: ' + settings.chartBackground }); + if (settings.mainFill) { + settings.standardBarStyle = 'stroke: ' + (settings.mainStroke ? settings.mainStroke : settings.mainFill) + '; fill: ' + settings.mainFill; + settings.collapsedSummaryLineStyle = 'stroke: ' + (settings.mainStroke ? settings.mainStroke : settings.mainFill) + '; stroke-width: 0.65px; stroke-dasharray: 2 2'; + } + if (settings.accentFill) + settings.standardCompletedBarStyle = 'stroke: ' + settings.accentFill + '; fill: ' + settings.accentFill; + if (settings.summaryFill) + settings.summaryBarStyle = 'stroke: ' + (settings.summaryStroke ? settings.summaryStroke : settings.summaryFill) + '; fill: ' + settings.summaryFill; + if (settings.diamondFill) + settings.milestoneBarStyle = 'stroke: ' + (settings.diamondStroke ? settings.diamondStroke : settings.diamondFill) + '; fill: ' + settings.diamondFill; + if (settings.mainStroke) { + settings.baselineBarStyle = 'fill: none; stroke: ' + settings.mainStroke + '; stroke-width: 0.65px; stroke-dasharray: 2, 2'; + settings.arrowFill = settings.mainStroke; + settings.dependencyLineStyle = 'stroke: ' + settings.arrowFill + '; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)'; + } + if (settings.chartForeground) + settings.assignmentsStyle = 'font-size: x-small; fill: ' + settings.chartForeground; + if (settings.alternativeBackground) { + settings.alternativeGridBackground = settings.alternativeBackground; + settings.alternativeChartBackground = settings.alternativeBackground; + } + if (settings.alternativeGridBackground) + settings.alternativeItemStyle = 'background-color: ' + settings.alternativeGridBackground; + if (settings.alternativeChartBackground) + settings.alternativeChartItemStyle = 'fill: ' + settings.alternativeChartBackground; +} +function initializeLoadChartTheme(settings, theme) { + initializeGanttChartTheme(settings, theme); + if (theme == 'Default') + return; + settings.barHeight = 20; + settings.allocationFill = settings.mainFill ? (settings.mainFill != 'white' ? settings.mainFill : settings.mainStroke) : '#8abbed'; + settings.normalAllocationBarStyle = settings.underAllocationBarStyle = 'stroke: ' + settings.allocationFill + '; fill: ' + settings.allocationFill; + settings.overAllocationBarStyle = 'stroke: #e31d3b; fill: #e31d3b'; +} +function initializePertChartTheme(settings, theme) { + if (theme == 'Default') + return; + settings.shapeStyle = 'fill: White; stroke: #606060; stroke-width: 1px'; + settings.milestoneStyle = 'fill: White; stroke: #606060; stroke-width: 1px'; + settings.dependencyLineStyle = 'stroke: #8abbed; stroke-width: 0.65px; fill: none; marker-end: url(#PertArrowMarker)'; + settings.virtualEffortDependencyLineStyle = 'stroke: #8abbed; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#PertArrowMarker)'; +} diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip index 8c53829eb..eb3a31532 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/TimeConstraints.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip index 582a710cf..7376a281c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/UndoRedo.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip index 46834eae3..72cd5f299 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WBS.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip index 3f2230d02..5ed0a82b2 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/WorkOptimizations.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip index d1435a747..f725bdc71 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/GanttChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip index 835f63591..432d5b693 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip index f27e4dcc3..f63f86767 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip index d5ab72c39..6b758aad0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip index 9636b1e71..5648a3d98 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip index b36ea4b0e..e1ce3f81a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/SingleItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip index 286a2eed6..06c34133b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/LoadChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip index 641d581fa..be38c107b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip index cb1ca8309..0c9694bb9 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip index 7f6825df0..ef525c7b6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip index a8cffa805..f8bd116fb 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/NetworkDiagramView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip index e292aa477..249945beb 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip index dd2b29be9..76e87985d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip index 52775cddd..8d0a9ae85 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip index 37d827da2..5a9303ff0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/PertChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip index 4357073b3..018d1ab85 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/AssigningTasks.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip index 62995e767..244b9421b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip index d048928ed..b6f98f1c3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip index fc9e694d0..5f20dca28 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip index 9e573e93b..2c2085cc0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip index 9c20f7534..696a5ad0d 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip index a45eaa81e..dac7bd5ef 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip index ffa8b9109..4912df1d4 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip index 376f8a9e5..1597b668e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip index 5eb37b5dc..1fdec8b18 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Hierarchy.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip index d2c56d56e..1c166a9ee 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip index ef0d66600..6014b300f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip index d116dbe7c..e883d6920 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip index 46b84f3b3..1e42b1838 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip index 086499bed..83f6231e1 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ResourceStatus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip index 50e7713fb..23569dda3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ShiftScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip index fae079f47..1c69d8191 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip index ba0bbeca4..8cf9af9dd 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip index 247ff4151..6ddf5d2e7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/JavaScript/ScheduleChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/React/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/React/GanttChartView/MainFeatures.zip index 24619dbfc..ad37cedd9 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/React/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/React/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/React/LoadChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/React/LoadChartView/MainFeatures.zip index 41abde5ff..54409d5cf 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/React/LoadChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/React/LoadChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/React/NetworkDiagramView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/React/NetworkDiagramView/MainFeatures.zip index 69e289b5f..ffcd42574 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/React/NetworkDiagramView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/React/NetworkDiagramView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/React/PertChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/React/PertChartView/MainFeatures.zip index 4adf4fe8d..d9a670989 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/React/PertChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/React/PertChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/React/ScheduleChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/React/ScheduleChartView/MainFeatures.zip index 96c005e69..e2a1d2e7b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/React/ScheduleChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/React/ScheduleChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip index 3ce750cb2..c69c22d7a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssigningResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip index 51c0a4ab3..9c0341aa6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AssignmentsTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip index cb0e504c3..e9d37ade0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/AutomaticScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip index d7d71ca85..bc463958b 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Baseline.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip index 73e94f346..9e60374ad 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip index ab9db3163..33cba0557 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip index 8f9a18539..d9cba4512 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip index 3f4c019e9..6f674b4f7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContextMenus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip index 5205f860b..9b08c4037 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip index de9012216..999894dfa 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CriticalPath.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip index 8a8db44c8..c20a3aca3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip index cd1de5cd9..7dcc7d4fb 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomSchedules.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip index 1d42cceae..6f4cf9f93 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip index e2dafc9f8..c5817e2b0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/DateTimeFormats.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip index d70a654aa..fc9de9751 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ExportPngImage-PMF.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip index 1f2279d88..380e3fe18 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip index 9b3662a4d..5a04487db 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Interruptions.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip index ea1e416b6..f155eee10 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip index d4c0bc152..447c82d33 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MaterialResources.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip index a97fda861..30acfbabc 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MinuteScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip index 4e7bb67eb..bf3e88b3a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip index 8cfdb6dab..3d88ef078 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MoveUpDown.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip index 0f7a54f31..734e58440 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/MultipleBarsPerItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip index a17137907..6df00f927 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Performance.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip index 0164d22fc..66641bf92 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip index c09d853a2..17e8ea82f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ProjectXml.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip index 28bbab3d6..33863632f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip index eb39acf5c..37d302c39 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SelectionModes.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip index cccacd06b..92881f75f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip index 603a1ae69..48bc42ee7 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Statuses.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip index 8c48e4c2e..ea3454320 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip index 504e0c0fa..ef183517e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/TimeConstraints.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip index 441e39478..369c69983 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/UndoRedo.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip index 78a559ae6..844cd8761 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WBS.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip index 118921627..edd7002a0 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/WorkOptimizations.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip index 76a8a5c9b..c03f14785 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/GanttChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip index e811896ab..df9566b9c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip index 9c82f2b8d..b1a5a07d6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip index fb922912d..27ba01e54 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip index df2d69988..8e7cf3e8a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip index 4e532f84b..7968d609a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/SingleItem.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip index 8685a6b7a..7f38adf86 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/LoadChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip index 46df2dd09..c6e9ff05c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip index e20314b24..1b2ed120e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip index 8cd58b379..2a3197716 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip index 53e7adfeb..0860589fc 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/NetworkDiagramView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip index 14d36342f..9067f565f 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip index 0983e3b09..605ac6f87 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip index 55fe043de..dafaecf64 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip index 66c6d2e51..9519f87d6 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/PertChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip index 83dde41cb..3fb1d1e04 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/AssigningTasks.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip index 37fcb274e..389ffbffa 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BasicUsage.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip index de0153d3b..7a71c5048 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/BuiltinScales.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip index 46f3350c8..6d4c2b253 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ChangeNotifications.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip index c1862cfa5..acc5c9be9 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Columns.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip index 1b6b77925..c4fd50a0a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ContinuousSchedule.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip index 1d2a6eae6..429f59baa 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomScale.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip index ab029bfec..5b0ab0431 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/CustomTemplate.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip index aa350ca73..f443f9f90 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Filtering.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip index 390435274..276c96657 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/GanttChartIntegration.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip index 14d16abeb..4a0463ad3 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Hierarchy.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip index 4271876aa..2feafa112 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/MouseEvents.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip index 2d5195d6c..8080ab52a 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Printing.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip index 231a103f1..ef68498ae 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ReadOnlySettings.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip index aea4719cb..b24eb0b7c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ResourceStatus.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip index 9f0c1e91a..295c445f1 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ShiftScheduling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip index 408af7f0a..ea2974b03 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/SpecialDays.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip index 63f3f6815..9c80c8542 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/Styling.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip index b32cf7472..b70f97e47 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/TypeScript/ScheduleChartView/ZoomLevel.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/GanttChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/GanttChartView/MainFeatures.zip index fb38207c9..963c5083e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/GanttChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/GanttChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/LoadChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/LoadChartView/MainFeatures.zip index 2cfe7f803..5cc7cde32 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/LoadChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/LoadChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/NetworkDiagramView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/NetworkDiagramView/MainFeatures.zip index 92e8995a2..d32d1bf3c 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/NetworkDiagramView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/NetworkDiagramView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/PertChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/PertChartView/MainFeatures.zip index 74c5f5bef..c05bbc7f1 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/PertChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/PertChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/ScheduleChartView/MainFeatures.zip b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/ScheduleChartView/MainFeatures.zip index d6b5686bd..d3edd237e 100644 Binary files a/GanttChartHyperLibraryDemos/Demos/Samples/Vue/ScheduleChartView/MainFeatures.zip and b/GanttChartHyperLibraryDemos/Demos/Samples/Vue/ScheduleChartView/MainFeatures.zip differ diff --git a/GanttChartHyperLibraryDemos/Demos/app.js b/GanttChartHyperLibraryDemos/Demos/app.js index eb753f2be..3bc4037e5 100644 --- a/GanttChartHyperLibraryDemos/Demos/app.js +++ b/GanttChartHyperLibraryDemos/Demos/app.js @@ -198,12 +198,24 @@ angular.module('Demos', []) } }, { - component: 'GanttChartView', feature: 'MultipleBarsPerItem', title: 'Multiple bars per item (parts)', description: 'Shows how you can define and display multiple bars for each task (i.e. item parts)', + component: 'GanttChartView', feature: 'SummaryUpdating', title: 'Summary updating (using drag operations)', description: 'Shows how to setup a custom template to allow dragging summary items and automatically update child tasks accordingly', sourceCodeFiles: { 'JavaScript': ['index.html', 'app.css', 'app.js'], 'TypeScript': ['index.html', 'app.css', 'app.ts'] } }, + { + component: 'GanttChartView', feature: 'SummaryBackgroundColors', title: 'Summary background colors', description: 'Shows how to setup a custom template to draw background rectangles of custom colors enclosing summary items and their child tasks', + sourceCodeFiles: { + 'JavaScript': ['index.html', 'app.css', 'app.js'] + } + }, + { + component: 'GanttChartView', feature: 'MultipleBarsPerItem', title: 'Multiple bars per item (parts)', description: 'Shows how you can define and display multiple bars for each task (i.e. item parts)', + sourceCodeFiles: { + 'JavaScript': ['index.html', 'app.css', 'app.js'] + } + }, { component: 'GanttChartView', feature: 'UndoRedo', title: 'Undo-redo (using Undo Management Library)', description: 'Shows how you can add support for undo and redo operations for the Gantt Chart items – using UndoStack component from DlhSoft Undo Management Library, available separately for free as open source', sourceCodeFiles: { diff --git a/GanttChartHyperLibraryDemos/Demos/app.ts b/GanttChartHyperLibraryDemos/Demos/app.ts index bc2d5df5b..39633a53a 100644 --- a/GanttChartHyperLibraryDemos/Demos/app.ts +++ b/GanttChartHyperLibraryDemos/Demos/app.ts @@ -209,6 +209,20 @@ angular.module('Demos', []) 'TypeScript': ['index.html', 'app.css', 'app.ts'] } }, + { + component: 'GanttChartView', feature: 'SummaryUpdating', title: 'Summary updating (using drag operations)', description: 'Shows how to setup a custom template to allow dragging summary items and automatically update child tasks accordingly', + sourceCodeFiles: { + 'JavaScript': ['index.html', 'app.css', 'app.js'], + 'TypeScript': ['index.html', 'app.css', 'app.ts'] + } + }, + { + component: 'GanttChartView', feature: 'SummaryBackgroundColors', title: 'Summary background colors', description: 'Shows how to setup a custom template to draw background rectangles of custom colors enclosing summary items and their child tasks', + sourceCodeFiles: { + 'JavaScript': ['index.html', 'app.css', 'app.js'], + 'TypeScript': ['index.html', 'app.css', 'app.ts'] + } + }, { component: 'GanttChartView', feature: 'MultipleBarsPerItem', title: 'Multiple bars per item (parts)', description: 'Shows how you can define and display multiple bars for each task (i.e. item parts)', sourceCodeFiles: {